Skip to content

Commit 2730f15

Browse files
committed
Return null block hash if it was requested with getmnlistdiff
1 parent a7af16a commit 2730f15

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/evo/simplifiedmns.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,11 @@ bool BuildSimplifiedMNListDiff(const uint256& baseBlockHash, const uint256& bloc
221221
auto dmnList = deterministicMNManager->GetListForBlock(blockIndex);
222222
mnListDiffRet = baseDmnList.BuildSimplifiedDiff(dmnList);
223223

224+
// We need to return the value that was provided by the other peer as it otherwise won't be able to recognize the
225+
// response. This will usually be identical to the block found in baseBlockIndex. The only difference is when a
226+
// null block hash was provided to get the diff from the genesis block.
227+
mnListDiffRet.baseBlockHash = baseBlockHash;
228+
224229
if (!mnListDiffRet.BuildQuorumsDiff(baseBlockIndex, blockIndex)) {
225230
errorRet = strprintf("failed to build quorums diff");
226231
return false;

0 commit comments

Comments
 (0)