Browse Source

Merge pull request #6865

298e040 Fix chainstate serialized_size computation (Pieter Wuille)
0.13
Gregory Maxwell 9 years ago
parent
commit
d0badb916e
No known key found for this signature in database
GPG Key ID: EAB5AF94D9E9ABE7
  1. 2
      qa/rpc-tests/blockchain.py
  2. 2
      src/txdb.cpp

2
qa/rpc-tests/blockchain.py

@ -43,7 +43,7 @@ class BlockchainTest(BitcoinTestFramework):
assert_equal(res[u'transactions'], 200) assert_equal(res[u'transactions'], 200)
assert_equal(res[u'height'], 200) assert_equal(res[u'height'], 200)
assert_equal(res[u'txouts'], 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'bestblock']), 64)
assert_equal(len(res[u'hash_serialized']), 64) assert_equal(len(res[u'hash_serialized']), 64)

2
src/txdb.cpp

@ -121,7 +121,7 @@ bool CCoinsViewDB::GetStats(CCoinsStats &stats) const {
nTotalAmount += out.nValue; nTotalAmount += out.nValue;
} }
} }
stats.nSerializedSize += 32 + pcursor->GetKeySize(); stats.nSerializedSize += 32 + pcursor->GetValueSize();
ss << VARINT(0); ss << VARINT(0);
} else { } else {
return error("CCoinsViewDB::GetStats() : unable to read value"); return error("CCoinsViewDB::GetStats() : unable to read value");

Loading…
Cancel
Save