Alpha: rename baking_bond_cost
into block_security_deposit
This commit is contained in:
parent
19cb91bcb6
commit
74d334463e
@ -260,7 +260,7 @@ module Constants : sig
|
||||
val nonce_length: int
|
||||
val seed_nonce_revelation_tip: Tez.t
|
||||
val origination_burn: Tez.t
|
||||
val baking_bond_cost: Tez.t
|
||||
val block_security_deposit: Tez.t
|
||||
val endorsement_bond_cost: Tez.t
|
||||
val faucet_credit: Tez.t
|
||||
|
||||
|
@ -134,7 +134,7 @@ let freeze_baking_bond ctxt { Block_header.priority ; _ } delegate =
|
||||
if Compare.Int.(priority >= Constants.first_free_baking_slot ctxt)
|
||||
then return (ctxt, Tez.zero)
|
||||
else
|
||||
let bond = Constants.baking_bond_cost in
|
||||
let bond = Constants.block_security_deposit in
|
||||
Delegate.freeze_bond ctxt delegate bond
|
||||
|> trace Cannot_freeze_baking_bond >>=? fun ctxt ->
|
||||
return (ctxt, bond)
|
||||
|
@ -29,7 +29,7 @@ val paying_priorities: context -> int list
|
||||
val minimal_time: context -> int -> Time.t -> Time.t tzresult Lwt.t
|
||||
|
||||
(** [freeze_baking_bond: ctxt delegate priority]
|
||||
Freeze the baking bond (See !Constants.baking_bond_cost)
|
||||
Freeze the baking bond (See !Constants.block_security_deposit)
|
||||
from a delegate account. No bond is frozen if the baking
|
||||
priority of this block is greater than the maximum number
|
||||
of paying baking in the network (meaning that n. bakers
|
||||
|
@ -21,7 +21,7 @@ let origination_burn =
|
||||
Tez_repr.one
|
||||
|
||||
(* 512 tez *)
|
||||
let baking_bond_cost =
|
||||
let block_security_deposit =
|
||||
Tez_repr.(mul_exn one 512)
|
||||
|
||||
(* 64 tez *)
|
||||
|
@ -72,11 +72,11 @@ let test_endorsement_payment () =
|
||||
let endorsement_bond_cost =
|
||||
Constants.endorsement_bond_cost in
|
||||
let baking = baker_hpub = contract_p.hpub && block_priority < 4 in
|
||||
let baking_bond_cost =
|
||||
let block_security_deposit =
|
||||
if baking
|
||||
then Constants.baking_bond_cost
|
||||
then Constants.block_security_deposit
|
||||
else Tez.zero in
|
||||
let cost = Cast.tez_add endorsement_bond_cost baking_bond_cost in
|
||||
let cost = Cast.tez_add endorsement_bond_cost block_security_deposit in
|
||||
let expected_balance = Cast.tez_sub init_balance cost in
|
||||
Assert.equal_tez ~msg: __LOC__ expected_balance bond_balance ;
|
||||
(* After one cycle, (4 blocks in test/proto_alpha/sandbox),
|
||||
|
Loading…
Reference in New Issue
Block a user