mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-06-18 03:38:57 +08:00
Remove unwrap in get_signer_transactions_with_retry
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
This commit is contained in:
committed by
jferrant
parent
5f9418a23f
commit
32bd01d189
@@ -116,11 +116,14 @@ impl StackerDB {
|
||||
if !chunk_ack.is_empty() {
|
||||
for chunk in chunk_ack {
|
||||
if let Some(data) = chunk {
|
||||
let message: SignerMessage = bincode::deserialize(&data).unwrap();
|
||||
if let SignerMessage::Transactions(chunk_transactions) = message {
|
||||
transactions.extend(chunk_transactions);
|
||||
if let Ok(message) = bincode::deserialize::<SignerMessage>(&data) {
|
||||
if let SignerMessage::Transactions(chunk_transactions) = message {
|
||||
transactions.extend(chunk_transactions);
|
||||
} else {
|
||||
warn!("Signer wrote an unexpected type to the transactions slot");
|
||||
}
|
||||
} else {
|
||||
warn!("Signer wrote an unexpected type to the transactions slot");
|
||||
warn!("Failed to deserialize chunk data into a SignerMessage");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user