HomePhabricator

Merge #13924: tests: Simplify comparison in rpc_blockchain.py

Description

Merge #13924: tests: Simplify comparison in rpc_blockchain.py

Summary:
1f87c372b5 Simplify comparison in rpc_blockchain.py. (Daniel Kraft)

Pull request description:

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.

Tree-SHA512: 3c376a8836b62988fb2f0117c9ca65de64a33bf3cd4980a123de30bf5e7b7a48eda477b25e03d672ff076e205c698e83432469156caa0f0f3ebbb0480f0dd77d

Backport of Core PR13924

Test Plan:

./test/functional/test_runner.py rpc_blockchain

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D7543

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Sep 23 2020, 23:18
jasonbcoxCommitted on Sep 23 2020, 23:18
abc-botPushed on Sep 23 2020, 23:23
Reviewer
Restricted Project
Differential Revision
D7543: Merge #13924: tests: Simplify comparison in rpc_blockchain.py
Parents
rABC65c02eebfa7a: [Backport]gui: hide HD & encryption icons when no wallet loaded
Branches
Unknown
Tags
Unknown