]> Untitled Git - bdk/commit
Use mixed order insertions
authorTobin Harding <me@tobin.cc>
Wed, 24 Feb 2021 02:39:36 +0000 (13:39 +1100)
committerTobin Harding <me@tobin.cc>
Wed, 24 Feb 2021 02:39:36 +0000 (13:39 +1100)
commitbda416df0acee8e0df2e32227a94aceb0c08e2a5
treee0eb5b600d0f1b544a81dab787e1a166c59a4777
parenta838c2bacc4e64308d8ba9cfb728bb412b4bdd0d
Use mixed order insertions

Currently we have a unit test to test that signers are sorted by
ordering. We call `add_external` to add them but currently we add them
in the same order we expect them to be in. This means if the
implementation happens to insert them simply in the order they are
added (i.e. insert to end of list) then this test will still pass.

Insert in a mixed order, including one lower followed by one higher -
this ensures we are not inserting at the front or at the back but are
actually sorting based on the `SignerOrdering`.
src/wallet/signer.rs