Skip to content

Commit

Permalink
Ignore bytes written for sighash_single bug output
Browse files Browse the repository at this point in the history
Clippy emits:

  error: written amount is not handled

This code is explicitly writing garbage to the writer, no need to handle
the number of bytes written.
  • Loading branch information
tcharding committed May 25, 2022
1 parent 14c72e7 commit dfff853
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/blockdata/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ impl Transaction {
// will result in the data written to the writer being hashed, however the correct
// handling of the SIGHASH_SINGLE bug is to return the 'one array' - either implement
// this behaviour manually or use `signature_hash()`.
writer.write(b"[not a transaction] SIGHASH_SINGLE bug")?;
let _ = writer.write(b"[not a transaction] SIGHASH_SINGLE bug")?;
return Ok(())
}

Expand Down

0 comments on commit dfff853

Please sign in to comment.