mirror of
https://github.com/basicswap/basicswap.git
synced 2026-03-01 08:55:10 +01:00
Compare commits
7 Commits
revert-409
...
339d52f114
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
339d52f114 | ||
|
|
d1d20e855b | ||
|
|
9d716d25cb | ||
|
|
2259e964b1 | ||
|
|
dc289a18ee | ||
|
|
b3591a2bb1 | ||
|
|
7e892ee9af |
@@ -1,3 +1,3 @@
|
|||||||
name = "basicswap"
|
name = "basicswap"
|
||||||
|
|
||||||
__version__ = "0.15.1"
|
__version__ = "0.15.2"
|
||||||
|
|||||||
@@ -3848,7 +3848,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
|
|
||||||
txid = ci_from.publishTx(bytes.fromhex(txn))
|
txid = ci_from.publishTx(bytes.fromhex(txn))
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Submitted initiate txn {txid} to {ci_from.coin_name()} chain for bid {self.log.id(bid_id)}",
|
f"Submitted initiate txn {self.logIDT(txid)} to {ci_from.coin_name()} chain for bid {self.log.id(bid_id)}",
|
||||||
)
|
)
|
||||||
bid.initiate_tx = SwapTx(
|
bid.initiate_tx = SwapTx(
|
||||||
bid_id=bid_id,
|
bid_id=bid_id,
|
||||||
@@ -5514,7 +5514,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
txn = self.createParticipateTxn(bid_id, bid, offer, participate_script)
|
txn = self.createParticipateTxn(bid_id, bid, offer, participate_script)
|
||||||
txid = ci_to.publishTx(bytes.fromhex(txn))
|
txid = ci_to.publishTx(bytes.fromhex(txn))
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Submitted participate tx {self.log.id(txid)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}"
|
f"Submitted participate tx {self.logIDT(txid)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}"
|
||||||
)
|
)
|
||||||
bid.setPTxState(TxStates.TX_SENT)
|
bid.setPTxState(TxStates.TX_SENT)
|
||||||
self.logEvent(
|
self.logEvent(
|
||||||
@@ -5622,7 +5622,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
txn = self.createRedeemTxn(ci_to.coin_type(), bid)
|
txn = self.createRedeemTxn(ci_to.coin_type(), bid)
|
||||||
txid = ci_to.publishTx(bytes.fromhex(txn))
|
txid = ci_to.publishTx(bytes.fromhex(txn))
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Submitted participate redeem tx {self.log.id(txid)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}."
|
f"Submitted participate redeem tx {self.logIDT(txid)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}."
|
||||||
)
|
)
|
||||||
self.logEvent(
|
self.logEvent(
|
||||||
Concepts.BID, bid.bid_id, EventLogTypes.PTX_REDEEM_PUBLISHED, "", None
|
Concepts.BID, bid.bid_id, EventLogTypes.PTX_REDEEM_PUBLISHED, "", None
|
||||||
@@ -5908,7 +5908,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
)
|
)
|
||||||
|
|
||||||
self.log.info(
|
self.log.info(
|
||||||
f"Submitted coin a lock refund spend tx for bid {self.log.id(bid_id)}, txid {self.log.id(txid_str)}"
|
f"Submitted coin a lock refund spend tx for bid {self.log.id(bid_id)}, txid {self.logIDT(txid_str)}"
|
||||||
)
|
)
|
||||||
bid.txns[TxTypes.XMR_SWAP_A_LOCK_REFUND_SPEND] = SwapTx(
|
bid.txns[TxTypes.XMR_SWAP_A_LOCK_REFUND_SPEND] = SwapTx(
|
||||||
bid_id=bid_id,
|
bid_id=bid_id,
|
||||||
@@ -5983,7 +5983,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
txid=bytes.fromhex(txid_hex),
|
txid=bytes.fromhex(txid_hex),
|
||||||
)
|
)
|
||||||
self.log.info(
|
self.log.info(
|
||||||
f"Submitted mercy tx for bid {self.log.id(bid_id)}, txid {self.log.id(txid_hex)}"
|
f"Submitted mercy tx for bid {self.log.id(bid_id)}, txid {self.logIDT(txid_hex)}"
|
||||||
)
|
)
|
||||||
self.logBidEvent(
|
self.logBidEvent(
|
||||||
bid_id,
|
bid_id,
|
||||||
@@ -6670,7 +6670,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
try:
|
try:
|
||||||
txid = ci_to.publishTx(bid.participate_txn_refund)
|
txid = ci_to.publishTx(bid.participate_txn_refund)
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Submitted participate refund txn {self.log.id(txid)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}."
|
f"Submitted participate refund txn {self.logIDT(txid)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}."
|
||||||
)
|
)
|
||||||
self.logEvent(
|
self.logEvent(
|
||||||
Concepts.BID,
|
Concepts.BID,
|
||||||
@@ -6726,7 +6726,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
def removeWatchedTransaction(self, coin_type, bid_id: bytes, txid_hex: str) -> None:
|
def removeWatchedTransaction(self, coin_type, bid_id: bytes, txid_hex: str) -> None:
|
||||||
# Remove all for bid if txid is None
|
# Remove all for bid if txid is None
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Removing watched transaction {Coins(coin_type).name} {self.log.id(bid_id)} {self.log.id(txid_hex)}"
|
f"Removing watched transaction {Coins(coin_type).name} {self.log.id(bid_id)} {self.logIDT(txid_hex)}"
|
||||||
)
|
)
|
||||||
watched = self.coin_clients[coin_type]["watched_transactions"]
|
watched = self.coin_clients[coin_type]["watched_transactions"]
|
||||||
old_len = len(watched)
|
old_len = len(watched)
|
||||||
@@ -6735,7 +6735,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
if wo.bid_id == bid_id and (txid_hex is None or wo.txid_hex == txid_hex):
|
if wo.bid_id == bid_id and (txid_hex is None or wo.txid_hex == txid_hex):
|
||||||
del watched[i]
|
del watched[i]
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Removed watched transaction {Coins(coin_type).name} {self.log.id(bid_id)} {self.log.id(wo.txid_hex)}"
|
f"Removed watched transaction {Coins(coin_type).name} {self.log.id(bid_id)} {self.logIDT(wo.txid_hex)}"
|
||||||
)
|
)
|
||||||
|
|
||||||
def addWatchedOutput(
|
def addWatchedOutput(
|
||||||
@@ -6756,7 +6756,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
def removeWatchedOutput(self, coin_type, bid_id: bytes, txid_hex: str) -> None:
|
def removeWatchedOutput(self, coin_type, bid_id: bytes, txid_hex: str) -> None:
|
||||||
# Remove all for bid if txid is None
|
# Remove all for bid if txid is None
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Removing watched output {Coins(coin_type).name} {self.log.id(bid_id)} {self.log.id(txid_hex)}"
|
f"Removing watched output {Coins(coin_type).name} {self.log.id(bid_id)} {self.logIDT(txid_hex)}"
|
||||||
)
|
)
|
||||||
watched = self.coin_clients[coin_type]["watched_outputs"]
|
watched = self.coin_clients[coin_type]["watched_outputs"]
|
||||||
old_len = len(watched)
|
old_len = len(watched)
|
||||||
@@ -6765,7 +6765,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
if wo.bid_id == bid_id and (txid_hex is None or wo.txid_hex == txid_hex):
|
if wo.bid_id == bid_id and (txid_hex is None or wo.txid_hex == txid_hex):
|
||||||
del watched[i]
|
del watched[i]
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Removed watched output {Coins(coin_type).name} {self.log.id(bid_id)} {self.log.id(wo.txid_hex)}"
|
f"Removed watched output {Coins(coin_type).name} {self.log.id(bid_id)} {self.logIDT(wo.txid_hex)}"
|
||||||
)
|
)
|
||||||
|
|
||||||
def addWatchedScript(
|
def addWatchedScript(
|
||||||
@@ -9408,7 +9408,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
xmr_swap.a_lock_tx, xmr_swap.a_lock_tx_script
|
xmr_swap.a_lock_tx, xmr_swap.a_lock_tx_script
|
||||||
)
|
)
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Submitted lock tx {self.log.id(txid_hex)} to {ci_from.coin_name()} chain for bid {self.log.id(bid_id)}.",
|
f"Submitted lock tx {self.logIDT(txid_hex)} to {ci_from.coin_name()} chain for bid {self.log.id(bid_id)}.",
|
||||||
)
|
)
|
||||||
|
|
||||||
if bid.xmr_a_lock_tx is None:
|
if bid.xmr_a_lock_tx is None:
|
||||||
@@ -9560,7 +9560,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Submitted lock txn {self.log.id(bid_id)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}."
|
f"Submitted lock txn {self.logIDT(b_lock_tx_id)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}."
|
||||||
)
|
)
|
||||||
bid.xmr_b_lock_tx = SwapTx(
|
bid.xmr_b_lock_tx = SwapTx(
|
||||||
bid_id=bid_id,
|
bid_id=bid_id,
|
||||||
@@ -9733,7 +9733,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
|
|
||||||
txid = bytes.fromhex(ci_from.publishTx(xmr_swap.a_lock_spend_tx))
|
txid = bytes.fromhex(ci_from.publishTx(xmr_swap.a_lock_spend_tx))
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Submitted lock spend txn {self.log.id(txid)} to {ci_from.coin_name()} chain for bid {self.log.id(bid_id)}."
|
f"Submitted lock spend txn {self.logIDT(txid)} to {ci_from.coin_name()} chain for bid {self.log.id(bid_id)}."
|
||||||
)
|
)
|
||||||
self.logBidEvent(
|
self.logBidEvent(
|
||||||
bid.bid_id, EventLogTypes.LOCK_TX_A_SPEND_TX_PUBLISHED, "", cursor
|
bid.bid_id, EventLogTypes.LOCK_TX_A_SPEND_TX_PUBLISHED, "", cursor
|
||||||
@@ -9843,7 +9843,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
lock_tx_vout=lock_tx_vout,
|
lock_tx_vout=lock_tx_vout,
|
||||||
)
|
)
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Submitted lock B spend txn {self.log.id(txid)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}."
|
f"Submitted lock B spend txn {self.logIDT(txid)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}."
|
||||||
)
|
)
|
||||||
self.logBidEvent(
|
self.logBidEvent(
|
||||||
bid.bid_id, EventLogTypes.LOCK_TX_B_SPEND_TX_PUBLISHED, "", cursor
|
bid.bid_id, EventLogTypes.LOCK_TX_B_SPEND_TX_PUBLISHED, "", cursor
|
||||||
@@ -9958,7 +9958,7 @@ class BasicSwap(BaseApp, BSXNetwork, UIApp):
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Submitted lock B refund txn {self.log.id(txid)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}."
|
f"Submitted lock B refund txn {self.logIDT(txid)} to {ci_to.coin_name()} chain for bid {self.log.id(bid_id)}."
|
||||||
)
|
)
|
||||||
self.logBidEvent(
|
self.logBidEvent(
|
||||||
bid.bid_id, EventLogTypes.LOCK_TX_B_REFUND_TX_PUBLISHED, "", cursor
|
bid.bid_id, EventLogTypes.LOCK_TX_B_REFUND_TX_PUBLISHED, "", cursor
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ BITCOIN_VERSION_TAG = os.getenv("BITCOIN_VERSION_TAG", "")
|
|||||||
LITECOIN_VERSION = os.getenv("LITECOIN_VERSION", "0.21.4")
|
LITECOIN_VERSION = os.getenv("LITECOIN_VERSION", "0.21.4")
|
||||||
LITECOIN_VERSION_TAG = os.getenv("LITECOIN_VERSION_TAG", "")
|
LITECOIN_VERSION_TAG = os.getenv("LITECOIN_VERSION_TAG", "")
|
||||||
|
|
||||||
DCR_VERSION = os.getenv("DCR_VERSION", "1.8.1")
|
DCR_VERSION = os.getenv("DCR_VERSION", "2.1.2")
|
||||||
DCR_VERSION_TAG = os.getenv("DCR_VERSION_TAG", "")
|
DCR_VERSION_TAG = os.getenv("DCR_VERSION_TAG", "")
|
||||||
|
|
||||||
NMC_VERSION = os.getenv("NMC_VERSION", "28.0")
|
NMC_VERSION = os.getenv("NMC_VERSION", "28.0")
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ chainparams = {
|
|||||||
"pubkey_address": 0x0E91,
|
"pubkey_address": 0x0E91,
|
||||||
"script_address": 0x0E6C,
|
"script_address": 0x0E6C,
|
||||||
"key_prefix": 0x2307,
|
"key_prefix": 0x2307,
|
||||||
"bip44": 1,
|
"bip44": 115,
|
||||||
"min_amount": 100000,
|
"min_amount": 100000,
|
||||||
"max_amount": 10000000 * COIN,
|
"max_amount": 10000000 * COIN,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -406,7 +406,10 @@ class DCRInterface(Secp256k1Interface):
|
|||||||
# Adjust verificationprogress to consider blocks wallet has synced
|
# Adjust verificationprogress to consider blocks wallet has synced
|
||||||
wallet_blocks = self.rpc_wallet("getinfo")["blocks"]
|
wallet_blocks = self.rpc_wallet("getinfo")["blocks"]
|
||||||
synced_ind = bci["verificationprogress"]
|
synced_ind = bci["verificationprogress"]
|
||||||
wallet_synced_ind = wallet_blocks / bci["headers"]
|
if bci["headers"] < 1:
|
||||||
|
wallet_synced_ind = 0
|
||||||
|
else:
|
||||||
|
wallet_synced_ind = wallet_blocks / bci["headers"]
|
||||||
if wallet_synced_ind < synced_ind:
|
if wallet_synced_ind < synced_ind:
|
||||||
bci["verificationprogress"] = wallet_synced_ind
|
bci["verificationprogress"] = wallet_synced_ind
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2024 tecnovert
|
# Copyright (c) 2024 tecnovert
|
||||||
|
# Copyright (c) 2025 The Basicswap developers
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
@@ -35,6 +36,13 @@ def createDCRWallet(args, hex_seed, logging, delay_event):
|
|||||||
response = b"y\n"
|
response = b"y\n"
|
||||||
elif "Enter existing wallet seed" in buf:
|
elif "Enter existing wallet seed" in buf:
|
||||||
response = (hex_seed + "\n").encode("utf-8")
|
response = (hex_seed + "\n").encode("utf-8")
|
||||||
|
elif "Do you have a wallet birthday we should rescan from" in buf:
|
||||||
|
response = b"no\n"
|
||||||
|
elif (
|
||||||
|
"Do you have an additional account to import from an extended public key"
|
||||||
|
in buf
|
||||||
|
):
|
||||||
|
response = b"no\n"
|
||||||
elif "Seed input successful" in buf:
|
elif "Seed input successful" in buf:
|
||||||
pass
|
pass
|
||||||
elif "Upgrading database from version" in buf:
|
elif "Upgrading database from version" in buf:
|
||||||
|
|||||||
@@ -130,10 +130,7 @@ def redeemITx(self, bid_id: bytes, cursor):
|
|||||||
|
|
||||||
bid.initiate_tx.spend_txid = bytes.fromhex(txid)
|
bid.initiate_tx.spend_txid = bytes.fromhex(txid)
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
"Submitted initiate redeem txn %s to %s chain for bid %s",
|
f"Submitted initiate redeem txn {self.logIDT(txid)} to {ci_from.coin_name()} chain for bid {self.logIDB(bid_id)}"
|
||||||
txid,
|
|
||||||
ci_from.coin_name(),
|
|
||||||
bid_id.hex(),
|
|
||||||
)
|
)
|
||||||
self.logEvent(Concepts.BID, bid_id, EventLogTypes.ITX_REDEEM_PUBLISHED, "", cursor)
|
self.logEvent(Concepts.BID, bid_id, EventLogTypes.ITX_REDEEM_PUBLISHED, "", cursor)
|
||||||
|
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ def recoverNoScriptTxnWithKey(self, bid_id: bytes, encoded_key, cursor=None):
|
|||||||
lock_tx_vout=lock_tx_vout,
|
lock_tx_vout=lock_tx_vout,
|
||||||
)
|
)
|
||||||
self.log.debug(
|
self.log.debug(
|
||||||
f"Submitted lock B spend txn {self.log.id(txid)} to {ci_follower.coin_name()} chain for bid {self.log.id(bid_id)}."
|
f"Submitted lock B spend txn {self.logIDT(txid)} to {ci_follower.coin_name()} chain for bid {self.log.id(bid_id)}."
|
||||||
)
|
)
|
||||||
self.logBidEvent(
|
self.logBidEvent(
|
||||||
bid.bid_id,
|
bid.bid_id,
|
||||||
|
|||||||
10
guix.scm
10
guix.scm
@@ -90,7 +90,7 @@
|
|||||||
(define python-coincurve-basicswap
|
(define python-coincurve-basicswap
|
||||||
(package
|
(package
|
||||||
(name "python-coincurve-basicswap")
|
(name "python-coincurve-basicswap")
|
||||||
(version "basicswap_v0.2")
|
(version "basicswap_v0.3")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
(file-name
|
(file-name
|
||||||
(git-file-name name version))
|
(git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "1vm9cvwr0z02zc0mp7l8qj9vhg8kmfrzysiwzg91zkgmccza9ryc"))))
|
(base32 "08bc8175v4d479lgavkcclc0kkh3icxm9i0i26wqd1g3bv0is8cm"))))
|
||||||
(build-system pyproject-build-system)
|
(build-system pyproject-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
@@ -135,15 +135,15 @@
|
|||||||
(define-public basicswap
|
(define-public basicswap
|
||||||
(package
|
(package
|
||||||
(name "basicswap")
|
(name "basicswap")
|
||||||
(version "0.15.1")
|
(version "0.15.2")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
(url "https://github.com/basicswap/basicswap")
|
(url "https://github.com/basicswap/basicswap")
|
||||||
(commit "0bc9d3a5db40f54d79e2ab18be58b6bbc20740d1")))
|
(commit "2259e964b11925587301070f9fc15e2226b2eb69")))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1x6c6hynvbayq4cyv9s6vwgsgdmhm7r1av6iy7pax103lj20habf"))
|
"0d544bj4kvra9y6rpqai1yvnk2igxj4z8s14g5jpksx5z9l0nyy3"))
|
||||||
(file-name (git-file-name name version))))
|
(file-name (git-file-name name version))))
|
||||||
(build-system pyproject-build-system)
|
(build-system pyproject-build-system)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# Copyright (c) 2024 tecnovert
|
# Copyright (c) 2024 tecnovert
|
||||||
# Copyright (c) 2024 The Basicswap developers
|
# Copyright (c) 2024-2025 The Basicswap developers
|
||||||
# Distributed under the MIT software license, see the accompanying
|
# Distributed under the MIT software license, see the accompanying
|
||||||
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
@@ -689,7 +689,7 @@ def prepareDCDDataDir(datadir, node_id, conf_file, dir_prefix, num_nodes=3):
|
|||||||
"noseeders=1\n",
|
"noseeders=1\n",
|
||||||
"nodnsseed=1\n",
|
"nodnsseed=1\n",
|
||||||
"nodiscoverip=1\n",
|
"nodiscoverip=1\n",
|
||||||
"miningaddr=SsYbXyjkKAEXXcGdFgr4u4bo4L8RkCxwQpH\n",
|
"miningaddr=SsppG7KLiH52NC7iJmUVGVq89FLS83E5vho\n",
|
||||||
]
|
]
|
||||||
|
|
||||||
for i in range(0, num_nodes):
|
for i in range(0, num_nodes):
|
||||||
@@ -725,7 +725,8 @@ class Test(BaseTest):
|
|||||||
dcr_daemons = []
|
dcr_daemons = []
|
||||||
start_ltc_nodes = False
|
start_ltc_nodes = False
|
||||||
start_xmr_nodes = True
|
start_xmr_nodes = True
|
||||||
dcr_mining_addr = "SsYbXyjkKAEXXcGdFgr4u4bo4L8RkCxwQpH"
|
# Addresses differ after 2.1.2, simnet bip44id changed from 1 to 115
|
||||||
|
dcr_mining_addr = "SsppG7KLiH52NC7iJmUVGVq89FLS83E5vho"
|
||||||
extra_wait_time = 0
|
extra_wait_time = 0
|
||||||
max_fee: int = 10000
|
max_fee: int = 10000
|
||||||
|
|
||||||
@@ -739,7 +740,8 @@ class Test(BaseTest):
|
|||||||
def prepareExtraCoins(cls):
|
def prepareExtraCoins(cls):
|
||||||
ci0 = cls.swap_clients[0].ci(cls.test_coin)
|
ci0 = cls.swap_clients[0].ci(cls.test_coin)
|
||||||
if not cls.restore_instance:
|
if not cls.restore_instance:
|
||||||
assert ci0.rpc_wallet("getnewaddress") == cls.dcr_mining_addr
|
dcr_mining_addr = ci0.rpc_wallet("getnewaddress")
|
||||||
|
assert dcr_mining_addr in cls.dcr_mining_addrs
|
||||||
cls.dcr_ticket_account = ci0.rpc_wallet(
|
cls.dcr_ticket_account = ci0.rpc_wallet(
|
||||||
"getaccount",
|
"getaccount",
|
||||||
[
|
[
|
||||||
@@ -776,7 +778,7 @@ class Test(BaseTest):
|
|||||||
num_passed: int = 0
|
num_passed: int = 0
|
||||||
for i in range(30):
|
for i in range(30):
|
||||||
try:
|
try:
|
||||||
ci0.rpc_wallet("purchaseticket", [cls.dcr_ticket_account, 0.1, 0])
|
ci0.rpc_wallet("purchaseticket", [cls.dcr_ticket_account, 0, 1])
|
||||||
num_passed += 1
|
num_passed += 1
|
||||||
if num_passed >= 5:
|
if num_passed >= 5:
|
||||||
break
|
break
|
||||||
@@ -902,14 +904,14 @@ class Test(BaseTest):
|
|||||||
masterpubkey = loop_ci.rpc_wallet("getmasterpubkey")
|
masterpubkey = loop_ci.rpc_wallet("getmasterpubkey")
|
||||||
masterpubkey_data = loop_ci.decode_address(masterpubkey)[4:]
|
masterpubkey_data = loop_ci.decode_address(masterpubkey)[4:]
|
||||||
|
|
||||||
seed_hash = loop_ci.getSeedHash(root_key)
|
seed_hash: bytes = loop_ci.getSeedHash(root_key)
|
||||||
if i == 0:
|
if i == 0:
|
||||||
assert (
|
assert (
|
||||||
masterpubkey
|
masterpubkey
|
||||||
== "spubVV1z2AFYjVZvzM45FSaWMPRqyUoUwyW78wfANdjdNG6JGCXrr8AbRvUgYb3Lm1iun9CgHew1KswdePryNLKEnBSQ82AjNpYdQgzXPUme9c6"
|
== "spubVUjNdu1HtDuQYHjVLTgdK3JKtC7JQoCUkhkoVn3rJt6kYctRksn4vTGsdV3obeZLHaB1YobsLENYKHjtey67LFZJdjJyAvHuRqgFRpaSmfn"
|
||||||
)
|
)
|
||||||
if i < 2:
|
if i < 2:
|
||||||
assert seed_hash == hash160(masterpubkey_data)
|
assert hash160(masterpubkey_data) == seed_hash
|
||||||
|
|
||||||
def test_001_segwit(self):
|
def test_001_segwit(self):
|
||||||
logging.info("---------- Test {} segwit".format(self.test_coin.name))
|
logging.info("---------- Test {} segwit".format(self.test_coin.name))
|
||||||
|
|||||||
Reference in New Issue
Block a user