Merge bitcoin/bitcoin#23209: test: Avoid RPC roundtrip in MiniWallet get_descriptor()
fa3ab7b5b1test: Avoid RPC roundtrip in MiniWallet get_descriptor() (MarcoFalke) Pull request description: No need to call an RPC to calculate the checksum. ACKs for top commit: theStack: ACKfa3ab7b5b1🍂 Tree-SHA512: 2ab019bf7535d7a9fbf30f7e9f1c35f70b0e699e52a8218cbde636fbb0062f58809e750156d7e3cde2ec532023482a4fb26e8f0f2a18def5727cf13b432e3bfd
This commit is contained in:
1 file changed
+2
-1
@@ -10,6 +10,7 @@ from enum import Enum
|
|||||||
from random import choice
|
from random import choice
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
from test_framework.address import ADDRESS_BCRT1_P2WSH_OP_TRUE
|
from test_framework.address import ADDRESS_BCRT1_P2WSH_OP_TRUE
|
||||||
|
from test_framework.descriptors import descsum_create
|
||||||
from test_framework.key import ECKey
|
from test_framework.key import ECKey
|
||||||
from test_framework.messages import (
|
from test_framework.messages import (
|
||||||
COIN,
|
COIN,
|
||||||
@@ -118,7 +119,7 @@ class MiniWallet:
|
|||||||
return blocks
|
return blocks
|
||||||
|
|
||||||
def get_descriptor(self):
|
def get_descriptor(self):
|
||||||
return self._test_node.getdescriptorinfo(f'raw({self._scriptPubKey.hex()})')['descriptor']
|
return descsum_create(f'raw({self._scriptPubKey.hex()})')
|
||||||
|
|
||||||
def get_address(self):
|
def get_address(self):
|
||||||
return self._address
|
return self._address
|
||||||
|
|||||||
Reference in new issue
Block a user