Simplify comparison in rpc_blockchain.py.

Simplify comparison in rpc_blockchain.py.

The test for gettxoutsetinfo in rpc_blockchain.py verifies that the
result is the same as before after invalidating and reconsidering a
block.  The comparison has to exclude the 'disk_size' field, though, as
it is not deterministic.

Instead of comparing all the other fields for equality, this change
explicitly removes the 'disk_size' field and then compares the full
objects.  This makes the intent more explicit (compare everything except
for disk_size, not compare just a given list of fields) and also the
code simpler.

情報元 - Simplify comparison in rpc_blockchain.py. · bitcoin/[email protected] · GitHub

Simplify comparison in rpc_blockchain.py. · bitcoin/bitcoin@1f87c37 · GitHub
スポンサーリンク

シェアする

フォローする

スポンサーリンク

トップへ戻る