]> git.bitcoin.ninja Git - rust-lightning/commit
Use usize for transaction-position-in-block values 2020-06-c-bindings-cleanups-2
authorMatt Corallo <git@bluematt.me>
Sat, 13 Jun 2020 01:01:32 +0000 (21:01 -0400)
committerMatt Corallo <git@bluematt.me>
Tue, 23 Jun 2020 20:12:55 +0000 (16:12 -0400)
commit5c370232eb48e5ddbd3c06cfc241dd726d4329a8
tree0db6e847fddbde0e733fe61d335200bf98a47c8e
parent7fc07b39a63384ef0e2887088b610bf9afa39b25
Use usize for transaction-position-in-block values

We use them largely as indexes into a Vec<Transaction> so there's
little reason for them to be u32s. Instead, use them as usize
everywhere.

We also take this opportunity to add range checks before
short_channel_id calculation, as we could otherwise end up with a
bogus short_channel_id due to an output index out of range.
fuzz/src/chanmon_consistency.rs
fuzz/src/full_stack.rs
fuzz/src/router.rs
lightning/src/chain/chaininterface.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/channelmonitor.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs
lightning/src/util/test_utils.rs