@@ -671,19 +671,19 @@ func TestEstimateGas(t *testing.T) {
671671 To : & accounts [1 ].addr ,
672672 Value : (* hexutil .Big )(big .NewInt (1000 )),
673673 },
674- expectErr : core .ErrInsufficientFunds ,
675- want : 21000 ,
674+ expectErr : core .ErrInsufficientFundsForTransfer ,
676675 },
677676 // empty create
678677 {
679678 blockNumber : rpc .LatestBlockNumber ,
680679 call : TransactionArgs {},
681- expectErr : nil ,
682- want : 53000 ,
680+ expectErr : errors .New ("gas required exceeds allowance (0)" ),
683681 },
684682 {
685683 blockNumber : rpc .LatestBlockNumber ,
686- call : TransactionArgs {},
684+ call : TransactionArgs {
685+ From : & randomAccounts [0 ].addr ,
686+ },
687687 overrides : StateOverride {
688688 randomAccounts [0 ].addr : OverrideAccount {Balance : newRPCBalance (new (big.Int ).Mul (big .NewInt (1 ), big .NewInt (params .Ether )))},
689689 },
@@ -700,7 +700,7 @@ func TestEstimateGas(t *testing.T) {
700700 overrides : StateOverride {
701701 randomAccounts [0 ].addr : OverrideAccount {Balance : newRPCBalance (big .NewInt (0 ))},
702702 },
703- expectErr : core .ErrInsufficientFunds ,
703+ expectErr : core .ErrInsufficientFundsForTransfer ,
704704 },
705705 // Test for a bug where the gas price was set to zero but the basefee non-zero
706706 //
@@ -763,7 +763,7 @@ func TestEstimateGas(t *testing.T) {
763763 t .Errorf ("test %d: want error %v, have nothing" , i , tc .expectErr )
764764 continue
765765 }
766- if ! errors .Is (err , tc .expectErr ) {
766+ if ! errors .Is (err , tc .expectErr ) && err . Error () != tc . expectErr . Error () {
767767 t .Errorf ("test %d: error mismatch, want %v, have %v" , i , tc .expectErr , err )
768768 }
769769 continue
0 commit comments