mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-04-22 04:28:02 +00:00
Pre-seed accounts with more ETH. (#73)
* Pre-seed accounts with more ETH. This commit fixes and solves some issues around how much ETH we seed an account with in genesis. Currently, any account that the node has keys to sign for will be seeded with u128::MAX WEI in genesis. This also includes the default signer account. * Bump commit hash of polkadot SDK * Change how the cache key is computed * Revert "Change how the cache key is computed" This reverts commit75afdd9cfd. * Revert "Bump commit hash of polkadot SDK" This reverts commit8aaa69780e. * Add extra comments * Revert "Add extra comments" This reverts commitbd4de2c83d. * Update the initial balance
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/// This constant defines how much Wei accounts are pre-seeded with in genesis.
|
||||
///
|
||||
/// We use [`u128::MAX`] here which means that accounts will be given 2^128 - 1 WEI which is
|
||||
/// (2^128 - 1) / 10^18 ETH.
|
||||
pub const INITIAL_BALANCE: u128 = u128::MAX;
|
||||
/// Note: After changing this number, check that the tests for kitchensink work as we encountered
|
||||
/// some issues with different values of the initial balance on Kitchensink.
|
||||
pub const INITIAL_BALANCE: u128 = 10u128.pow(37);
|
||||
|
||||
@@ -86,6 +86,8 @@ impl Instance {
|
||||
for signer_address in
|
||||
<EthereumWallet as NetworkWallet<Ethereum>>::signer_addresses(&self.wallet)
|
||||
{
|
||||
// Note, the use of the entry API here means that we only modify the entries for any
|
||||
// account that is not in the `alloc` field of the genesis state.
|
||||
genesis
|
||||
.alloc
|
||||
.entry(signer_address)
|
||||
|
||||
@@ -131,6 +131,8 @@ impl KitchensinkNode {
|
||||
for signer_address in
|
||||
<EthereumWallet as NetworkWallet<Ethereum>>::signer_addresses(&self.wallet)
|
||||
{
|
||||
// Note, the use of the entry API here means that we only modify the entries for any
|
||||
// account that is not in the `alloc` field of the genesis state.
|
||||
genesis
|
||||
.alloc
|
||||
.entry(signer_address)
|
||||
|
||||
+1
-5
@@ -33,9 +33,5 @@
|
||||
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
"timestamp": "0x00",
|
||||
"alloc": {
|
||||
"90F8bf6A479f320ead074411a4B0e7944Ea8c9C1": {
|
||||
"balance": "10000000000000000000000"
|
||||
}
|
||||
}
|
||||
"alloc": {}
|
||||
}
|
||||
Reference in New Issue
Block a user