mirror of
https://github.com/basicswap/basicswap.git
synced 2024-11-16 15:58:17 +00:00
Bump version.
This commit is contained in:
parent
f6916f093b
commit
273da833db
5 changed files with 26 additions and 7 deletions
|
@ -1,3 +1,3 @@
|
||||||
name = "basicswap"
|
name = "basicswap"
|
||||||
|
|
||||||
__version__ = "0.14.1"
|
__version__ = "0.14.2"
|
||||||
|
|
|
@ -3883,12 +3883,15 @@ class BasicSwap(BaseApp):
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
if self.isBchXmrSwap(offer):
|
if self.isBchXmrSwap(offer):
|
||||||
|
if ci_from.altruistic():
|
||||||
for_ed25519: bool = True if ci_to.curve_type() == Curves.ed25519 else False
|
for_ed25519: bool = True if ci_to.curve_type() == Curves.ed25519 else False
|
||||||
kbsf = self.getPathKey(ci_from.coin_type(), ci_to.coin_type(), bid.created_at, xmr_swap.contract_count, KeyTypes.KBSF, for_ed25519)
|
kbsf = self.getPathKey(ci_from.coin_type(), ci_to.coin_type(), bid.created_at, xmr_swap.contract_count, KeyTypes.KBSF, for_ed25519)
|
||||||
|
|
||||||
mercy_tx = ci_from.createMercyTx(xmr_swap.a_lock_refund_swipe_tx, h2b(txid), xmr_swap.a_lock_refund_tx_script, kbsf)
|
mercy_tx = ci_from.createMercyTx(xmr_swap.a_lock_refund_swipe_tx, h2b(txid), xmr_swap.a_lock_refund_tx_script, kbsf)
|
||||||
txid = ci_from.publishTx(mercy_tx)
|
txid = ci_from.publishTx(mercy_tx)
|
||||||
self.log.info('Submitted mercy tx for bid %s, txid %s', bid_id.hex(), txid)
|
self.log.info('Submitted mercy tx for bid {}, txid {}'.format(bid_id.hex(), txid))
|
||||||
|
else:
|
||||||
|
self.log.info('Not sending mercy tx for bid {}'.format(bid_id.hex()))
|
||||||
except Exception as ex:
|
except Exception as ex:
|
||||||
self.log.debug('Trying to publish coin a lock refund swipe tx: %s', str(ex))
|
self.log.debug('Trying to publish coin a lock refund swipe tx: %s', str(ex))
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@ class CoinInterface:
|
||||||
self.setDefaults()
|
self.setDefaults()
|
||||||
self._network = network
|
self._network = network
|
||||||
self._mx_wallet = threading.Lock()
|
self._mx_wallet = threading.Lock()
|
||||||
|
self._altruistic = True
|
||||||
|
|
||||||
def setDefaults(self):
|
def setDefaults(self):
|
||||||
self._unknown_wallet_seed = True
|
self._unknown_wallet_seed = True
|
||||||
|
@ -166,6 +167,9 @@ class CoinInterface:
|
||||||
def checkWallets(self) -> int:
|
def checkWallets(self) -> int:
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
def altruistic(self) -> bool:
|
||||||
|
return self._altruistic
|
||||||
|
|
||||||
|
|
||||||
class AdaptorSigInterface():
|
class AdaptorSigInterface():
|
||||||
def getScriptLockTxDummyWitness(self, script: bytes):
|
def getScriptLockTxDummyWitness(self, script: bytes):
|
||||||
|
|
|
@ -627,9 +627,11 @@ class BTCInterface(Secp256k1Interface):
|
||||||
|
|
||||||
tx.vout.append(self.txoType()(locked_coin, self.getScriptForPubkeyHash(pkh_dest)))
|
tx.vout.append(self.txoType()(locked_coin, self.getScriptForPubkeyHash(pkh_dest)))
|
||||||
|
|
||||||
if self._altruistic and kbsf:
|
if self.altruistic() and kbsf:
|
||||||
# Add mercy_keyshare
|
# Add mercy_keyshare
|
||||||
tx.vout.append(self.txoType()(0, CScript([OP_RETURN, b'XBSW', kbsf])))
|
tx.vout.append(self.txoType()(0, CScript([OP_RETURN, b'XBSW', kbsf])))
|
||||||
|
else:
|
||||||
|
self._log.debug('Not attaching mercy output, have kbsf {}.'.format('true' if kbsf else 'false'))
|
||||||
|
|
||||||
dummy_witness_stack = self.getScriptLockRefundSwipeTxDummyWitness(script_lock_refund)
|
dummy_witness_stack = self.getScriptLockRefundSwipeTxDummyWitness(script_lock_refund)
|
||||||
witness_bytes = self.getWitnessStackSerialisedLength(dummy_witness_stack)
|
witness_bytes = self.getWitnessStackSerialisedLength(dummy_witness_stack)
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
|
||||||
|
0.14.2
|
||||||
|
==============
|
||||||
|
|
||||||
|
- BCH support.
|
||||||
|
- Mercy outputs on swipe txns of BTC descended coins.
|
||||||
|
- Disable by setting 'altruistic' to false in basicswap.json
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0.13.2
|
0.13.2
|
||||||
==============
|
==============
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue