Skip to content

Commit

Permalink
rename sat_vb to fee_per_vb
Browse files Browse the repository at this point in the history
  • Loading branch information
lamafab committed Aug 24, 2023
1 parent 08ec9bc commit ca8a85b
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions rust/tw_bitcoin/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ impl BitcoinEntry {
})
.collect(),
input_selector: proto.input_selector,
weight_base: proto.sat_vb,
weight_base: proto.fee_per_vb,
change_script_pubkey,
disable_change_output: proto.disable_change_output,
};
Expand Down Expand Up @@ -301,7 +301,7 @@ impl BitcoinEntry {
script_pubkey: Cow::Borrowed(&out.script_pubkey),
})
.collect(),
weight_base: proto.sat_vb,
weight_base: proto.fee_per_vb,
};

let utxo_serialized = tw_utxo::compiler::Compiler::compile(utxo_preserializtion);
Expand Down
2 changes: 1 addition & 1 deletion rust/tw_bitcoin/src/modules/legacy/build_and_sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub fn taproot_build_and_sign_transaction(
// The input selector, as dictated by the `TransactionPlan` of the
// legacy protobuf structure.
input_selector,
sat_vb: legacy.byte_fee as u64,
fee_per_vb: legacy.byte_fee as u64,
change_output: Some(
// The change output (return to myself).
Proto::Output {
Expand Down
4 changes: 2 additions & 2 deletions rust/tw_bitcoin/src/tests/brc20.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fn coin_entry_sign_brc20_commit_reveal_transfer() {
inputs: vec![tx1],
outputs: vec![out1, out2],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: 0,
fee_per_vb: 0,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down Expand Up @@ -124,7 +124,7 @@ fn coin_entry_sign_brc20_commit_reveal_transfer() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: 0,
fee_per_vb: 0,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down
8 changes: 4 additions & 4 deletions rust/tw_bitcoin/src/tests/free_estimate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn p2pkh_fee_estimate() {
inputs: vec![],
outputs: vec![],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: SAT_VB,
fee_per_vb: SAT_VB,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down Expand Up @@ -92,7 +92,7 @@ fn p2wpkh_fee_estimate() {
inputs: vec![],
outputs: vec![],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: SAT_VB,
fee_per_vb: SAT_VB,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down Expand Up @@ -176,7 +176,7 @@ fn p2tr_key_path_fee_estimate() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: SAT_VB,
fee_per_vb: SAT_VB,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down Expand Up @@ -242,7 +242,7 @@ fn brc20_inscribe_fee_estimate() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: SAT_VB,
fee_per_vb: SAT_VB,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down
4 changes: 2 additions & 2 deletions rust/tw_bitcoin/src/tests/ordinal_nft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ fn coin_entry_sign_ordinal_nft_commit_reveal_transfer() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: 0,
fee_per_vb: 0,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down Expand Up @@ -113,7 +113,7 @@ fn coin_entry_sign_ordinal_nft_commit_reveal_transfer() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: 0,
fee_per_vb: 0,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down
4 changes: 2 additions & 2 deletions rust/tw_bitcoin/src/tests/p2tr_key_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fn coin_entry_sign_input_p2pkh_output_p2tr_key_path() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: 0,
fee_per_vb: 0,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down Expand Up @@ -90,7 +90,7 @@ fn coin_entry_sign_input_p2pkh_output_p2tr_key_path() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: 0,
fee_per_vb: 0,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down
2 changes: 1 addition & 1 deletion rust/tw_bitcoin/src/tests/p2wpkh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn coin_entry_sign_input_p2pkh_and_p2wpkh_output_p2wpkh() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: 0,
fee_per_vb: 0,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down
6 changes: 3 additions & 3 deletions rust/tw_bitcoin/src/tests/send_to_address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn send_to_p2pkh_address() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: 0,
fee_per_vb: 0,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down Expand Up @@ -114,7 +114,7 @@ fn send_to_p2wpkh_address() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: 0,
fee_per_vb: 0,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down Expand Up @@ -181,7 +181,7 @@ fn send_to_p2tr_key_path_address() {
inputs: vec![tx1],
outputs: vec![out1],
input_selector: UtxoProto::InputSelector::UseAll,
sat_vb: 0,
fee_per_vb: 0,
change_output: Default::default(),
disable_change_output: true,
};
Expand Down
2 changes: 1 addition & 1 deletion src/proto/BitcoinV2.proto
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ message SigningInput {

Utxo.Proto.InputSelector input_selector = 7;

uint64 sat_vb = 8;
uint64 fee_per_vb = 8;

// The change output to be added (return to sender).
// The `value` can be left at 0.
Expand Down

0 comments on commit ca8a85b

Please sign in to comment.