From 5c7a686e6b5906210a73f54a6d47e77b3d1d7154 Mon Sep 17 00:00:00 2001 From: Stan Kladko <13399135+kladkogex@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:11:33 +0000 Subject: [PATCH 1/2] 1135 get pending transactions --- chains/Schain.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/chains/Schain.cpp b/chains/Schain.cpp index e9e1d42a..ec4cd43c 100644 --- a/chains/Schain.cpp +++ b/chains/Schain.cpp @@ -404,6 +404,14 @@ void Schain::lockWithDeadLockCheck( const char* _functionName ) { result = ( ( uint64_t ) getLastCommittedBlockID() ) - committedIDOld; if ( !getNode()->isSyncOnlyNode() ) { proposeNextBlock( true ); + } else { + // on sync nodes we get candidate block and throw it away immediately + // this is to clean skaled queues + u256 stateRoot = 0; + if (!extFace) { // we are in tests + return; + } + extFace->pendingTransactions( getNode()->getMaxTransactionsPerBlock(), stateRoot ); } } From 77c101094ce15dc549cb4a1e606919c8e8170012 Mon Sep 17 00:00:00 2001 From: Stan Kladko <13399135+kladkogex@users.noreply.github.com> Date: Mon, 18 Dec 2023 20:14:37 +0000 Subject: [PATCH 2/2] 1135 get pending transactions --- chains/Schain.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/chains/Schain.cpp b/chains/Schain.cpp index ec4cd43c..4571ea05 100644 --- a/chains/Schain.cpp +++ b/chains/Schain.cpp @@ -407,11 +407,10 @@ void Schain::lockWithDeadLockCheck( const char* _functionName ) { } else { // on sync nodes we get candidate block and throw it away immediately // this is to clean skaled queues - u256 stateRoot = 0; - if (!extFace) { // we are in tests - return; + if (extFace) { // if extFace is null we are in consensus tests and there is no skaled + u256 stateRoot = 0; + extFace->pendingTransactions( getNode()->getMaxTransactionsPerBlock(), stateRoot ); } - extFace->pendingTransactions( getNode()->getMaxTransactionsPerBlock(), stateRoot ); } }