Merge pull request #1005 from zingolabs/add_marginal_fee
This commit is contained in:
commit
17013076ae
|
@ -21,6 +21,8 @@ and this library adheres to Rust's notion of
|
||||||
set of closures.
|
set of closures.
|
||||||
- Test helpers, behind the `test-dependencies` feature flag:
|
- Test helpers, behind the `test-dependencies` feature flag:
|
||||||
- `zcash_primitives::prover::mock::{MockSpendProver, MockOutputProver}`
|
- `zcash_primitives::prover::mock::{MockSpendProver, MockOutputProver}`
|
||||||
|
- MARGINAL_FEE pub const Amount:
|
||||||
|
- `zcash_primitives::transaction::fees::zip317::MARGINAL_FEE`
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- `zcash_primitives::transaction::components::sapling`:
|
- `zcash_primitives::transaction::components::sapling`:
|
||||||
|
|
|
@ -20,6 +20,11 @@ use crate::{
|
||||||
/// [ZIP 317]: https//zips.z.cash/zip-0317
|
/// [ZIP 317]: https//zips.z.cash/zip-0317
|
||||||
pub const MINIMUM_FEE: Amount = Amount::const_from_i64(10_000);
|
pub const MINIMUM_FEE: Amount = Amount::const_from_i64(10_000);
|
||||||
|
|
||||||
|
/// The marginal fee using the standard [ZIP 317] constants.
|
||||||
|
///
|
||||||
|
/// [ZIP 317]: https//zips.z.cash/zip-0317
|
||||||
|
pub const MARGINAL_FEE: Amount = Amount::const_from_i64(5_000);
|
||||||
|
|
||||||
/// A [`FeeRule`] implementation that implements the [ZIP 317] fee rule.
|
/// A [`FeeRule`] implementation that implements the [ZIP 317] fee rule.
|
||||||
///
|
///
|
||||||
/// This fee rule supports only P2pkh transparent inputs; an error will be returned if a coin
|
/// This fee rule supports only P2pkh transparent inputs; an error will be returned if a coin
|
||||||
|
@ -42,7 +47,7 @@ impl FeeRule {
|
||||||
/// [ZIP 317]: https//zips.z.cash/zip-0317
|
/// [ZIP 317]: https//zips.z.cash/zip-0317
|
||||||
pub fn standard() -> Self {
|
pub fn standard() -> Self {
|
||||||
Self {
|
Self {
|
||||||
marginal_fee: Amount::from_u64(5000).unwrap(),
|
marginal_fee: MARGINAL_FEE,
|
||||||
grace_actions: 2,
|
grace_actions: 2,
|
||||||
p2pkh_standard_input_size: 150,
|
p2pkh_standard_input_size: 150,
|
||||||
p2pkh_standard_output_size: 34,
|
p2pkh_standard_output_size: 34,
|
||||||
|
|
Loading…
Reference in New Issue