diff --git a/zebra-chain/src/transaction/builder.rs b/zebra-chain/src/transaction/builder.rs index 227658ad479..f4397d51465 100644 --- a/zebra-chain/src/transaction/builder.rs +++ b/zebra-chain/src/transaction/builder.rs @@ -18,6 +18,7 @@ impl Transaction { outputs: impl IntoIterator, transparent::Script)>, extra_coinbase_data: Vec, like_zcashd: bool, + miner_fee: Amount, burn_amount: Option>, ) -> Transaction { let mut extra_data = None; @@ -117,8 +118,8 @@ impl Transaction { sapling_shielded_data: None, orchard_shielded_data: None, - // > The NSM burn_amount field [ZIP-233] must be set. It can be set to 0. - burn_amount: burn_amount.unwrap_or(Amount::zero()), + // > The NSM burn_amount field [ZIP-233] must be set at minimum to 60% of miner fees [ZIP-235]. + burn_amount: burn_amount.unwrap_or_else(|| ((miner_fee * 6).unwrap() / 10).unwrap()), } } diff --git a/zebra-rpc/src/methods/get_block_template_rpcs/get_block_template.rs b/zebra-rpc/src/methods/get_block_template_rpcs/get_block_template.rs index 7b02a0912c0..6e2a2a11f24 100644 --- a/zebra-rpc/src/methods/get_block_template_rpcs/get_block_template.rs +++ b/zebra-rpc/src/methods/get_block_template_rpcs/get_block_template.rs @@ -367,6 +367,7 @@ pub fn generate_coinbase_transaction( outputs, extra_coinbase_data, like_zcashd, + miner_fee, burn_amount, ) .into() @@ -388,6 +389,7 @@ pub fn generate_coinbase_transaction( outputs, extra_coinbase_data, like_zcashd, + miner_fee, burn_amount, ) .into()