@@ -719,7 +719,7 @@ func TestFastVsFullChains(t *testing.T) {
719
719
// If the block number is multiple of 3, send a few bonus transactions to the miner
720
720
if i % 3 == 2 {
721
721
for j := 0 ; j < i % 4 + 1 ; j ++ {
722
- tx , err := types .SignTx (types .NewTransaction (block .TxNonce (address ), common.Address {0x00 }, big .NewInt (1000 ), bigTxGas , nil , nil ), signer , key )
722
+ tx , err := types .SignTx (types .NewTransaction (block .TxNonce (address ), common.Address {0x00 }, big .NewInt (1000 ), params . TxGas , nil , nil ), signer , key )
723
723
if err != nil {
724
724
panic (err )
725
725
}
@@ -883,8 +883,8 @@ func TestChainTxReorgs(t *testing.T) {
883
883
// Create two transactions shared between the chains:
884
884
// - postponed: transaction included at a later block in the forked chain
885
885
// - swapped: transaction included at the same block number in the forked chain
886
- postponed , _ := types .SignTx (types .NewTransaction (0 , addr1 , big .NewInt (1000 ), bigTxGas , nil , nil ), signer , key1 )
887
- swapped , _ := types .SignTx (types .NewTransaction (1 , addr1 , big .NewInt (1000 ), bigTxGas , nil , nil ), signer , key1 )
886
+ postponed , _ := types .SignTx (types .NewTransaction (0 , addr1 , big .NewInt (1000 ), params . TxGas , nil , nil ), signer , key1 )
887
+ swapped , _ := types .SignTx (types .NewTransaction (1 , addr1 , big .NewInt (1000 ), params . TxGas , nil , nil ), signer , key1 )
888
888
889
889
// Create two transactions that will be dropped by the forked chain:
890
890
// - pastDrop: transaction dropped retroactively from a past block
@@ -900,13 +900,13 @@ func TestChainTxReorgs(t *testing.T) {
900
900
chain , _ := GenerateChain (params .TestChainConfig , genesis , db , 3 , func (i int , gen * BlockGen ) {
901
901
switch i {
902
902
case 0 :
903
- pastDrop , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr2 ), addr2 , big .NewInt (1000 ), bigTxGas , nil , nil ), signer , key2 )
903
+ pastDrop , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr2 ), addr2 , big .NewInt (1000 ), params . TxGas , nil , nil ), signer , key2 )
904
904
905
905
gen .AddTx (pastDrop ) // This transaction will be dropped in the fork from below the split point
906
906
gen .AddTx (postponed ) // This transaction will be postponed till block #3 in the fork
907
907
908
908
case 2 :
909
- freshDrop , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr2 ), addr2 , big .NewInt (1000 ), bigTxGas , nil , nil ), signer , key2 )
909
+ freshDrop , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr2 ), addr2 , big .NewInt (1000 ), params . TxGas , nil , nil ), signer , key2 )
910
910
911
911
gen .AddTx (freshDrop ) // This transaction will be dropped in the fork from exactly at the split point
912
912
gen .AddTx (swapped ) // This transaction will be swapped out at the exact height
@@ -925,18 +925,18 @@ func TestChainTxReorgs(t *testing.T) {
925
925
chain , _ = GenerateChain (params .TestChainConfig , genesis , db , 5 , func (i int , gen * BlockGen ) {
926
926
switch i {
927
927
case 0 :
928
- pastAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), bigTxGas , nil , nil ), signer , key3 )
928
+ pastAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), params . TxGas , nil , nil ), signer , key3 )
929
929
gen .AddTx (pastAdd ) // This transaction needs to be injected during reorg
930
930
931
931
case 2 :
932
932
gen .AddTx (postponed ) // This transaction was postponed from block #1 in the original chain
933
933
gen .AddTx (swapped ) // This transaction was swapped from the exact current spot in the original chain
934
934
935
- freshAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), bigTxGas , nil , nil ), signer , key3 )
935
+ freshAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), params . TxGas , nil , nil ), signer , key3 )
936
936
gen .AddTx (freshAdd ) // This transaction will be added exactly at reorg time
937
937
938
938
case 3 :
939
- futureAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), bigTxGas , nil , nil ), signer , key3 )
939
+ futureAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), params . TxGas , nil , nil ), signer , key3 )
940
940
gen .AddTx (futureAdd ) // This transaction will be added after a full reorg
941
941
}
942
942
})
0 commit comments