Browse Source
Fix chainstate serialized_size computation
pull/4/head
Pieter Wuille
9 years ago
committed by
Jack Grigg
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
2 changed files with
2 additions and
2 deletions
-
qa/rpc-tests/blockchain.py
-
src/txdb.cpp
|
|
@ -43,7 +43,7 @@ class BlockchainTest(BitcoinTestFramework): |
|
|
|
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) |
|
|
|
|
|
|
|
|
|
@ -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"); |
|
|
|