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:
Thomas Eizinger 2021-03-16 18:02:31 +11:00
parent dd6c66a594
commit 6beb732e35
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96
5 changed files with 34 additions and 46 deletions

View file

@ -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)