summaryrefslogtreecommitdiff
path: root/btc-wire/src
diff options
context:
space:
mode:
Diffstat (limited to 'btc-wire/src')
-rw-r--r--btc-wire/src/bin/segwit-demo.rs2
-rw-r--r--btc-wire/src/lib.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/btc-wire/src/bin/segwit-demo.rs b/btc-wire/src/bin/segwit-demo.rs
index 26f95f0..579f0da 100644
--- a/btc-wire/src/bin/segwit-demo.rs
+++ b/btc-wire/src/bin/segwit-demo.rs
@@ -54,7 +54,7 @@ pub fn main() {
hex::encode(&second_half)
);
// bech32: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki
- let hrp = match address.network {
+ let hrp = match address.network() {
Network::Bitcoin => "bc",
Network::Testnet | Network::Signet => "tb",
Network::Regtest => "bcrt",
diff --git a/btc-wire/src/lib.rs b/btc-wire/src/lib.rs
index 750e4d4..05842b1 100644
--- a/btc-wire/src/lib.rs
+++ b/btc-wire/src/lib.rs
@@ -60,7 +60,7 @@ impl Rpc {
amount: &Amount,
metadata: &[u8; 32],
) -> rpc::Result<Txid> {
- let hrp = match to.network {
+ let hrp = match to.network() {
Network::Bitcoin => "bc",
Network::Testnet | Network::Signet => "tb",
Network::Regtest => "bcrt",
@@ -70,11 +70,11 @@ impl Rpc {
let addresses = [
Address::from_str(&addresses[0])
.unwrap()
- .require_network(to.network)
+ .require_network(*to.network())
.unwrap(),
Address::from_str(&addresses[1])
.unwrap()
- .require_network(to.network)
+ .require_network(*to.network())
.unwrap(),
];
let mut recipients = vec![(to, amount)];