Merge rust-bitcoin/rust-bitcoin#1410: Change `max_money` to a constant.
e9dffb1b7b
Change `max_money` to a constant. (Martin Habovstiak) Pull request description: The value is statically known which is better expressed as a constant. Also allows usage in const context. ACKs for top commit: apoelstra: ACKe9dffb1b7b
tcharding: ACKe9dffb1b7b
ariard: ACKe9dffb1
sanket1729: ACKe9dffb1b7b
Tree-SHA512: b9b80d573531fe75dce22e185a1c84b2885160334418d1cfbd7279684fd4229c3c6c4041d3a3badb3652c5723e90ff52d3c761cbc3bff7b73978776694a67422
This commit is contained in:
commit
29704f2872
|
@ -60,9 +60,7 @@ pub const MAX_SCRIPTNUM_VALUE: u32 = 0x80000000; // 2^31
|
|||
/// The maximum value allowed in an output (useful for sanity checking,
|
||||
/// since keeping everything below this value should prevent overflows
|
||||
/// if you are doing anything remotely sane with monetary values).
|
||||
pub fn max_money() -> u64 {
|
||||
21_000_000 * COIN_VALUE
|
||||
}
|
||||
pub const MAX_MONEY: u64 = 21_000_000 * COIN_VALUE;
|
||||
|
||||
/// Constructs and returns the coinbase (and only) transaction of the Bitcoin genesis block
|
||||
fn bitcoin_genesis_tx() -> Transaction {
|
||||
|
|
Loading…
Reference in New Issue