Page MenuHomePhabricator

[electrum] fix delegator key detection when building multi-level delegation
ClosedPublic

Authored by PiRK on Thu, Nov 16, 15:07.

Details

Summary

This was not updated in D14603, and as a result the delegator key would not be automatically filled when pasting an existing delegation in the delegation editor to add another level to it.

Test Plan

Generate a delegation, using a suggested key as the delegated key. Copy the delegation, close the delegation editor, reopen it, and paste the delegation in the "from exisitng delegation" field. Check that the delegator key is correctly set to the previous delegated key. Add another level with a new suggested key, repeat the test.

python test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Thu, Nov 16, 15:07

Tail of the build log:

-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: event 
-- Found Boost: /usr/lib/x86_64-linux-gnu/cmake/Boost-1.74.0/BoostConfig.cmake (found suitable version "1.74.0", minimum required is "1.64")  
-- Found Event component pthreads: /usr/lib/x86_64-linux-gnu/libevent_pthreads.so
-- Found Event: /usr/include (found suitable version "2.1.12-stable", minimum required is "2.0.22") found components: pthreads 
-- Found MiniUPnPc component miniupnpc: /usr/lib/x86_64-linux-gnu/libminiupnpc.so
-- Found MiniUPnPc: /usr/include/miniupnpc (found suitable version "2.2.1", minimum required is "1.9")  
-- Found NATPMP component natpmp: /usr/lib/x86_64-linux-gnu/libnatpmp.so
-- Found NATPMP: /usr/include   
-- Found BerkeleyDB component CXX: /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
-- Found BerkeleyDB: /usr/include (found suitable version "5.3.28", minimum required is "5.3") found components: CXX 
-- Found SQLite3: /usr/include (found suitable version "3.34.1", minimum required is "3.7.17") 
-- Found ZeroMQ component zmq: /usr/lib/x86_64-linux-gnu/libzmq.so
-- Found ZeroMQ: /usr/include (found suitable version "4.3.4", minimum required is "4.1.5")  
-- Could NOT find Protobuf (missing: Protobuf_DIR)
-- Found Protobuf: /usr/lib/x86_64-linux-gnu/libprotobuf.so;-pthread (found version "3.12.4") 
-- Found OpenSSL: /usr/lib/x86_64-linux-gnu/libcrypto.so (found version "1.1.1w")  
-- Looking for EVP_MD_CTX_new
-- Looking for EVP_MD_CTX_new - found
-- Found QREncode component qrencode: /usr/lib/x86_64-linux-gnu/libqrencode.so
-- Found QREncode: /usr/include   
-- Configuring native build in /work/abc-ci-builds/electrum-tests/native
-- Configuring done
-- Generating done
-- Build files have been written to: /work/abc-ci-builds/electrum-tests
[1/2] link test_runner.py
[2/2] Run Electrum ABC unit tests...
FAILED: electrum/CMakeFiles/check-electrum 
cd /work/abc-ci-builds/electrum-tests/electrum && /usr/bin/python3.9 ./test_runner.py
[secp256k1] warning: libsecp256k1 library failed to load
[secp256k1] warning: loading from /work/electrum/electrumabc/libsecp256k1.so.0 failed with: /work/electrum/electrumabc/libsecp256k1.so.0: cannot open shared object file: No such file or directory
[secp256k1] warning: loading from libsecp256k1.so.0 failed with: libsecp256k1.so.0: cannot open shared object file: No such file or directory
Testing `setup.py --version`: OK

[ecc] info: libsecp256k1 library not available, falling back to python-ecdsa. This means signing operations will be slower. Try running:

  $  contrib/make_secp

(You need to be running from the git sources for contrib/make_secp to be available)
..................................................................................................................127.0.0.1 - - [16/Nov/2023 15:08:32] "GET /invoice HTTP/1.1" 503 -
.127.0.0.1 - - [16/Nov/2023 15:08:32] "GET / HTTP/1.1" 200 -
.127.0.0.1 - - [16/Nov/2023 15:08:33] "GET /invoice HTTP/1.1" 200 -
127.0.0.1 - - [16/Nov/2023 15:08:33] "POST /pay HTTP/1.1" 200 -
.127.0.0.1 - - [16/Nov/2023 15:08:33] "GET / HTTP/1.1" 200 -
.s.........................................................................................................................................s.........sss...................................F.....s.s....
======================================================================
FAIL: test_bip39_seed_bip44_standard (electrumabc.tests.test_wallet_vertical.TestWalletKeystoreAddressIntegrity)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/mock.py", line 1337, in patched
    return func(*newargs, **newkeywargs)
  File "/work/electrum/electrumabc/tests/test_wallet_vertical.py", line 192, in test_bip39_seed_bip44_standard
    self.assertEqual(
AssertionError: None != 1

----------------------------------------------------------------------
Ran 313 tests in 17.642s

FAILED (failures=1, skipped=7)
ninja: build stopped: cannot make progress due to previous errors.
Build electrum-tests failed with exit code 1
Fabien requested changes to this revision.Thu, Nov 16, 15:18
Fabien added a subscriber: Fabien.

back to your queue

This revision now requires changes to proceed.Thu, Nov 16, 15:18

adjust the relevant unit test

This revision is now accepted and ready to land.Fri, Nov 17, 10:20