Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Commit

Permalink
Fix chainstate serialized_size computation
Browse files Browse the repository at this point in the history
Cherry-picked from bitcoin/bitcoin#6865
  • Loading branch information
MarkLTZ committed Mar 15, 2018
1 parent fcc2707 commit 67fb0bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qa/rpc-tests/blockchain.py
Expand Up @@ -43,7 +43,7 @@ def run_test(self):
assert_equal(res[u'transactions'], 200)
assert_equal(res[u'height'], 200)
assert_equal(res[u'txouts'], 200)
assert_equal(res[u'bytes_serialized'], 13000),
assert_equal(res[u'bytes_serialized'], 13924),
assert_equal(len(res[u'bestblock']), 64)
assert_equal(len(res[u'hash_serialized']), 64)

Expand Down
2 changes: 1 addition & 1 deletion src/txdb.cpp
Expand Up @@ -185,7 +185,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) const {
nTotalAmount += out.nValue;
}
}
stats.nSerializedSize += 32 + pcursor->GetKeySize();
stats.nSerializedSize += 32 + pcursor->GetValueSize();
ss << VARINT(0);
} else {
return error("CCoinsViewDB::GetStats() : unable to read value");
Expand Down

0 comments on commit 67fb0bf

Please sign in to comment.