mirror of
https://github.com/basicswap/basicswap.git
synced 2025-12-29 08:51:37 +01:00
backports
This commit is contained in:
@@ -94,6 +94,7 @@ class Test(unittest.TestCase):
|
||||
time_val = 48 * 60 * 60
|
||||
encoded = ci.getExpectedSequence(TxLockTypes.SEQUENCE_LOCK_TIME, time_val)
|
||||
decoded = ci.decodeSequence(encoded)
|
||||
assert encoded == 4194642
|
||||
assert decoded >= time_val
|
||||
assert decoded <= time_val + 512
|
||||
|
||||
|
||||
@@ -319,6 +319,7 @@ class Test(BaseTest):
|
||||
test_coin_from = Coins.PART
|
||||
# p2wpkh
|
||||
logging.info("---------- Test {} segwit".format(test_coin_from.name))
|
||||
|
||||
ci = self.swap_clients[0].ci(test_coin_from)
|
||||
|
||||
addr_native = ci.rpc_wallet("getnewaddress", ["p2pkh segwit test"])
|
||||
@@ -329,9 +330,11 @@ class Test(BaseTest):
|
||||
],
|
||||
)
|
||||
assert addr_info["iswitness"] is False # address is p2pkh, not p2wpkh
|
||||
|
||||
addr_segwit = ci.rpc_wallet(
|
||||
"getnewaddress", ["p2wpkh segwit test", True, False, False, "bech32"]
|
||||
)
|
||||
|
||||
addr_info = ci.rpc_wallet(
|
||||
"getaddressinfo",
|
||||
[
|
||||
@@ -351,6 +354,7 @@ class Test(BaseTest):
|
||||
],
|
||||
],
|
||||
)
|
||||
|
||||
assert len(txid) == 64
|
||||
tx_wallet = ci.rpc_wallet(
|
||||
"gettransaction",
|
||||
|
||||
Reference in New Issue
Block a user