iotaledger/iota.rs

Whats the point of a default nonce? Isnt setting an Option::None better? otherwise elsewhere we have to validate DEFAULT nonce vs block nonce again

Closed this issue · 1 comments

    Whats the point of a default nonce? Isnt setting an Option::None better? otherwise elsewhere we have to validate DEFAULT nonce vs block nonce again

Originally posted by @kwek20 in #1346 (comment)

To me it looks fine how it's now, since 0 is used fore remote PoW
But changing it would also not require any big changes, I think we would just need to set it to 0 ourselves in this place

let mut block_builder = BlockBuilder::new(parents);
if let Some(p) = payload {
block_builder = block_builder.with_payload(p);
}
Ok(block_builder.finish()?)

Closing it for now, @kwek20 pls reopen if you want to do it anyways