@@ -81,7 +81,7 @@ func TestStateProcessorErrors(t *testing.T) {
81
81
Config : config ,
82
82
Alloc : GenesisAlloc {
83
83
common .HexToAddress ("0x71562b71999873DB5b286dF957af199Ec94617F7" ): GenesisAccount {
84
- Balance : big .NewInt (2000000000000000000 ), // 2 ether
84
+ Balance : big .NewInt (4000000000000000000 ), // 4 ether
85
85
Nonce : 0 ,
86
86
},
87
87
common .HexToAddress ("0xfd0810DD14796680f72adf1a371963d0745BCc64" ): GenesisAccount {
@@ -103,10 +103,10 @@ func TestStateProcessorErrors(t *testing.T) {
103
103
}{
104
104
{ // ErrNonceTooLow
105
105
txs : []* types.Transaction {
106
- makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), params .TxGas , big .NewInt (70000000000 ), nil ),
107
- makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), params .TxGas , big .NewInt (70000000000 ), nil ),
106
+ makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), params .TxGas , big .NewInt (810000000000 ), nil ),
107
+ makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), params .TxGas , big .NewInt (810000000000 ), nil ),
108
108
},
109
- want : "could not apply tx 1 [0x035a4d54498b8faecac7ead306be8d5c641d81150da56d4ca0011820c9d0e732 ]: nonce too low: address 0x71562b71999873DB5b286dF957af199Ec94617F7, tx: 0 state: 1" ,
109
+ want : "could not apply tx 1 [0xff614db3c65e3d21b66c25829da0daadc6119feeb6ace13a5fc8e72f60f3b8e6 ]: nonce too low: address 0x71562b71999873DB5b286dF957af199Ec94617F7, tx: 0 state: 1" ,
110
110
},
111
111
{ // ErrNonceTooHigh
112
112
txs : []* types.Transaction {
@@ -122,37 +122,37 @@ func TestStateProcessorErrors(t *testing.T) {
122
122
},
123
123
{ // ErrGasLimitReached
124
124
txs : []* types.Transaction {
125
- makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), 21000000 , big .NewInt (70000000000 ), nil ),
125
+ makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), 21000000 , big .NewInt (81000000000 ), nil ),
126
126
},
127
- want : "could not apply tx 0 [0x71f496a82fafcb2e3cab0e27796b10984702fd00ea7ad648af22397cb05652a8 ]: gas limit reached" ,
127
+ want : "could not apply tx 0 [0x8513c2ba1a55e84a30582ce8ece0c5ea5e446590cdcd8384506ee16cbfcede73 ]: gas limit reached" ,
128
128
},
129
129
{ // ErrInsufficientFundsForTransfer
130
130
txs : []* types.Transaction {
131
131
makeTx (key1 , 0 , common.Address {}, big .NewInt (1000000000000000000 ), params .TxGas , big .NewInt (800000000000000 ), nil ),
132
132
},
133
- want : "could not apply tx 0 [0x95c504430523b9af2e3765f7a79b5a77275dd329a1f79d7251121b286a80c667]: insufficient funds for gas * price + value: address 0x71562b71999873DB5b286dF957af199Ec94617F7 have 2000000000000000000 want 17800000000000000000" ,
133
+ want : "could not apply tx 0 [0x95c504430523b9af2e3765f7a79b5a77275dd329a1f79d7251121b286a80c667]: insufficient funds for gas * price + value: address 0x71562b71999873DB5b286dF957af199Ec94617F7 have 4000000000000000000 want 17800000000000000000" ,
134
134
},
135
135
{ // ErrInsufficientFunds
136
136
txs : []* types.Transaction {
137
137
makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), params .TxGas , big .NewInt (900000000000000000 ), nil ),
138
138
},
139
- want : "could not apply tx 0 [0x4a69690c4b0cd85e64d0d9ea06302455b01e10a83db964d60281739752003440]: insufficient funds for gas * price + value: address 0x71562b71999873DB5b286dF957af199Ec94617F7 have 2000000000000000000 want 18900000000000000000000" ,
139
+ want : "could not apply tx 0 [0x4a69690c4b0cd85e64d0d9ea06302455b01e10a83db964d60281739752003440]: insufficient funds for gas * price + value: address 0x71562b71999873DB5b286dF957af199Ec94617F7 have 4000000000000000000 want 18900000000000000000000" ,
140
140
},
141
141
// ErrGasUintOverflow
142
142
// One missing 'core' error is ErrGasUintOverflow: "gas uint64 overflow",
143
143
// In order to trigger that one, we'd have to allocate a _huge_ chunk of data, such that the
144
144
// multiplication len(data) +gas_per_byte overflows uint64. Not testable at the moment
145
145
{ // ErrIntrinsicGas
146
146
txs : []* types.Transaction {
147
- makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), params .TxGas - 1000 , big .NewInt (70000000000 ), nil ),
147
+ makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), params .TxGas - 1000 , big .NewInt (81000000000 ), nil ),
148
148
},
149
- want : "could not apply tx 0 [0x0d0ca7d886da6c28ac094d3c2d2d0783b3753c9b92fcd2987c8d21b87fceb69f ]: intrinsic gas too low: have 20000, want 21000" ,
149
+ want : "could not apply tx 0 [0xa1973160a53bd892ab1a7489c2aa84bf41ee3d13e383e84b49d29c02bb8348e7 ]: intrinsic gas too low: have 20000, want 21000" ,
150
150
},
151
151
{ // ErrGasLimitReached
152
152
txs : []* types.Transaction {
153
- makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), params .TxGas * 1000 , big .NewInt (70000000000 ), nil ),
153
+ makeTx (key1 , 0 , common.Address {}, big .NewInt (0 ), params .TxGas * 1000 , big .NewInt (81000000000 ), nil ),
154
154
},
155
- want : "could not apply tx 0 [0x71f496a82fafcb2e3cab0e27796b10984702fd00ea7ad648af22397cb05652a8 ]: gas limit reached" ,
155
+ want : "could not apply tx 0 [0x8513c2ba1a55e84a30582ce8ece0c5ea5e446590cdcd8384506ee16cbfcede73 ]: gas limit reached" ,
156
156
},
157
157
{ // ErrFeeCapTooLow
158
158
txs : []* types.Transaction {
@@ -187,13 +187,13 @@ func TestStateProcessorErrors(t *testing.T) {
187
187
txs : []* types.Transaction {
188
188
mkDynamicTx (0 , common.Address {}, params .TxGas , big .NewInt (1 ), big .NewInt (500000000000000 )),
189
189
},
190
- want : "could not apply tx 0 [0x3e4bc338670810e7edcd7570dce67ee4e4ac9e38fcea6febc51f89d9bd7fe4ec]: insufficient funds for gas * price + value: address 0x71562b71999873DB5b286dF957af199Ec94617F7 have 2000000000000000000 want 10500000000000000000" ,
190
+ want : "could not apply tx 0 [0x3e4bc338670810e7edcd7570dce67ee4e4ac9e38fcea6febc51f89d9bd7fe4ec]: insufficient funds for gas * price + value: address 0x71562b71999873DB5b286dF957af199Ec94617F7 have 4000000000000000000 want 10500000000000000000" ,
191
191
},
192
192
{ // Another ErrInsufficientFunds, this one to ensure that feecap/tip of max u256 is allowed
193
193
txs : []* types.Transaction {
194
194
mkDynamicTx (0 , common.Address {}, params .TxGas , bigNumber , bigNumber ),
195
195
},
196
- want : "could not apply tx 0 [0xd82a0c2519acfeac9a948258c47e784acd20651d9d80f9a1c67b4137651c3a24]: insufficient funds for gas * price + value: address 0x71562b71999873DB5b286dF957af199Ec94617F7 have 2000000000000000000 want 2431633873983640103894990685182446064918669677978451844828609264166175722438635000" ,
196
+ want : "could not apply tx 0 [0xd82a0c2519acfeac9a948258c47e784acd20651d9d80f9a1c67b4137651c3a24]: insufficient funds for gas * price + value: address 0x71562b71999873DB5b286dF957af199Ec94617F7 have 4000000000000000000 want 2431633873983640103894990685182446064918669677978451844828609264166175722438635000" ,
197
197
},
198
198
} {
199
199
block := GenerateBadBlock (genesis , ubqhash .NewFaker (), tt .txs , gspec .Config )
0 commit comments