mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-16 16:41:10 +00:00
contracts: Fix some minor bugs around instantiation (#8879)
* Fix output of wrongly outputted error
The "Tombstoned a contract that is below the subsistence threshold: {:?}" was
triggered when too few balance was provided. It was a false alarm.
* Fix return of wrong code_len
* Split up `NotCallable` into more fine grained errors
* Fix typos in docs
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
* RentNotPayed -> RentNotPaid
* Fix typo: payed -> paid
It is OK to change the in-storage field name because:
1. The SCALE encoding is not based on names only on position.
2. The struct is not public (only to the crate).
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
committed by
GitHub
parent
a28a517c53
commit
c92d4a2638
@@ -409,7 +409,7 @@ benchmarks! {
|
||||
|
||||
// We benchmark the costs for sucessfully evicting an empty contract.
|
||||
// The actual costs are depending on how many storage items the evicted contract
|
||||
// does have. However, those costs are not to be payed by the sender but
|
||||
// does have. However, those costs are not to be paid by the sender but
|
||||
// will be distributed over multiple blocks using a scheduler. Otherwise there is
|
||||
// no incentive to remove large contracts when the removal is more expensive than
|
||||
// the reward for removing them.
|
||||
@@ -435,7 +435,7 @@ benchmarks! {
|
||||
instance.ensure_tombstone()?;
|
||||
|
||||
// the caller should get the reward for being a good snitch
|
||||
// this is capped by the maximum amount of rent payed. So we only now that it should
|
||||
// this is capped by the maximum amount of rent paid. So we only now that it should
|
||||
// have increased by at most the surcharge reward.
|
||||
assert!(
|
||||
T::Currency::free_balance(&instance.caller) >
|
||||
|
||||
Reference in New Issue
Block a user