mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-23 14:50:45 +01:00
Correct funding_transaction_generated
err msg and fix fuzz check
This fixes new errors in `full_stack_target` pointed out by Chaincode's generous fuzzing infrastructure. Specifically, there's no reason to check the error message in the `funding_transaction_generated` return value - it can only return a failure if the channel has closed since the funding transaction was generated (which is fine) or if the signer refuses to sign (which can't happen in fuzzing).
This commit is contained in:
parent
ca1b8bdf60
commit
10e06331f3
2 changed files with 2 additions and 6 deletions
|
@ -634,11 +634,7 @@ pub fn do_test(data: &[u8], logger: &Arc<dyn Logger>) {
|
|||
if let Err(e) = channelmanager.funding_transaction_generated(&funding_generation.0, &funding_generation.1, tx.clone()) {
|
||||
// It's possible the channel has been closed in the mean time, but any other
|
||||
// failure may be a bug.
|
||||
if let APIError::ChannelUnavailable { err } = e {
|
||||
if !err.starts_with("Can't find a peer matching the passed counterparty node_id ") {
|
||||
assert_eq!(err, "No such channel");
|
||||
}
|
||||
} else { panic!(); }
|
||||
if let APIError::ChannelUnavailable { .. } = e { } else { panic!(); }
|
||||
}
|
||||
pending_funding_signatures.insert(funding_output, tx);
|
||||
}
|
||||
|
|
|
@ -2691,7 +2691,7 @@ where
|
|||
(chan, funding_msg)
|
||||
},
|
||||
Err(_) => { return Err(APIError::ChannelUnavailable {
|
||||
err: "Error deriving keys or signing initial commitment transactions - either our RNG or our counterparty's RNG is broken or the Signer refused to sign".to_owned()
|
||||
err: "Signer refused to sign the initial commitment transaction".to_owned()
|
||||
}) },
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue