mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-29 03:56:33 -05:00
Eliminate build_bitcoin_punish_transaction
We reduce indirection by constructing TxPunish directly based off `State3` and make the type itself more powerful by moving the logic of completing it with a signature onto it.
This commit is contained in:
parent
dd6c66a594
commit
6beb732e35
5 changed files with 34 additions and 46 deletions
|
|
@ -110,6 +110,15 @@ impl From<PublicKey> for Point {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<PublicKey> for ::bitcoin::PublicKey {
|
||||
fn from(from: PublicKey) -> Self {
|
||||
::bitcoin::PublicKey {
|
||||
compressed: true,
|
||||
key: from.0.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Point> for PublicKey {
|
||||
fn from(p: Point) -> Self {
|
||||
Self(p)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue