Skip to content

Commit

Permalink
Update revault_net to fix message field names
Browse files Browse the repository at this point in the history
  • Loading branch information
darosior authored and Zshan0 committed May 18, 2022
1 parent 347d624 commit 3c3fc4c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions src/communication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,14 @@ fn send_wt_sigs_msg(
// `sigs` MUST contain valid signatures (including the attached sighash type)
pub fn send_coord_sig_msg(
transport: &mut KKTransport,
id: Txid,
txid: Txid,
sigs: BTreeMap<secp256k1::PublicKey, secp256k1::Signature>,
) -> Result<(), CommunicationError> {
for (pubkey, signature) in sigs {
let sig_msg = coordinator::Sig {
pubkey,
signature,
id,
txid,
};
log::debug!("Sending sig '{:?}' to sync server", sig_msg,);
let sig_result: coordinator::SigResult = transport.send_req(&sig_msg.into())?;
Expand Down Expand Up @@ -302,7 +302,7 @@ pub fn get_presigs(
transport: &mut KKTransport,
txid: Txid,
) -> Result<BTreeMap<secp256k1::PublicKey, secp256k1::Signature>, CommunicationError> {
let getsigs_msg = GetSigs { id: txid };
let getsigs_msg = GetSigs { txid };

log::debug!("Sending to sync server: '{:?}'", getsigs_msg,);
let resp: Sigs = transport.send_req(&getsigs_msg.into())?;
Expand Down Expand Up @@ -477,7 +477,7 @@ mod tests {
&message::RequestParams::CoordSig(coordinator::Sig {
pubkey: public_key.key,
signature,
id: txid
txid: txid
}),
);
Some(message::ResponseResult::Sig(
Expand Down Expand Up @@ -524,7 +524,7 @@ mod tests {
&message::RequestParams::CoordSig(coordinator::Sig {
pubkey: public_key.key,
signature,
id: txid
txid: txid
}),
);
Some(message::ResponseResult::Sig(
Expand Down Expand Up @@ -581,7 +581,7 @@ mod tests {
&message::RequestParams::CoordSig(coordinator::Sig {
pubkey: public_key.key,
signature,
id: other_cancel.txid(),
txid: other_cancel.txid(),
}),
);
Some(message::ResponseResult::Sig(
Expand Down Expand Up @@ -669,7 +669,7 @@ mod tests {
&message::RequestParams::CoordSig(coordinator::Sig {
pubkey: public_key.key,
signature: signature_cancel,
id: other_cancel.txid(),
txid: other_cancel.txid(),
}),
);
Some(message::ResponseResult::Sig(
Expand All @@ -685,7 +685,7 @@ mod tests {
&message::RequestParams::CoordSig(coordinator::Sig {
pubkey: public_key.key,
signature: signature_emer,
id: other_emer.txid(),
txid: other_emer.txid(),
}),
);
Some(message::ResponseResult::Sig(
Expand All @@ -701,7 +701,7 @@ mod tests {
&message::RequestParams::CoordSig(coordinator::Sig {
pubkey: public_key.key,
signature: signature_unemer,
id: other_unvault_emer.txid(),
txid: other_unvault_emer.txid(),
}),
);
Some(message::ResponseResult::Sig(
Expand Down Expand Up @@ -754,7 +754,7 @@ mod tests {
&message::RequestParams::CoordSig(coordinator::Sig {
pubkey: public_key.key,
signature,
id: other_unvault.txid(),
txid: other_unvault.txid(),
}),
);
Some(message::ResponseResult::Sig(
Expand Down Expand Up @@ -812,7 +812,7 @@ mod tests {
&message::RequestParams::CoordSig(coordinator::Sig {
pubkey: public_key.key,
signature,
id: other_unvault.txid(),
txid: other_unvault.txid(),
}),
);
Some(message::ResponseResult::Sig(
Expand Down Expand Up @@ -1184,7 +1184,7 @@ mod tests {
.read_req(|params| {
assert_eq!(
&params,
&message::RequestParams::GetSigs(GetSigs { id: same_txid })
&message::RequestParams::GetSigs(GetSigs { txid: same_txid })
);
Some(message::ResponseResult::Sigs(message::coordinator::Sigs {
signatures: other_sigs,
Expand Down
2 changes: 1 addition & 1 deletion tests/servers/coordinatord
Submodule coordinatord updated 2 files
+2 −2 Cargo.lock
+12 −12 src/processing.rs

0 comments on commit 3c3fc4c

Please sign in to comment.