@@ -719,7 +719,7 @@ func TestFastVsFullChains(t *testing.T) {
719719 // If the block number is multiple of 3, send a few bonus transactions to the miner
720720 if i % 3 == 2 {
721721 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 )
723723 if err != nil {
724724 panic (err )
725725 }
@@ -883,8 +883,8 @@ func TestChainTxReorgs(t *testing.T) {
883883 // Create two transactions shared between the chains:
884884 // - postponed: transaction included at a later block in the forked chain
885885 // - 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 )
888888
889889 // Create two transactions that will be dropped by the forked chain:
890890 // - pastDrop: transaction dropped retroactively from a past block
@@ -900,13 +900,13 @@ func TestChainTxReorgs(t *testing.T) {
900900 chain , _ := GenerateChain (params .TestChainConfig , genesis , db , 3 , func (i int , gen * BlockGen ) {
901901 switch i {
902902 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 )
904904
905905 gen .AddTx (pastDrop ) // This transaction will be dropped in the fork from below the split point
906906 gen .AddTx (postponed ) // This transaction will be postponed till block #3 in the fork
907907
908908 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 )
910910
911911 gen .AddTx (freshDrop ) // This transaction will be dropped in the fork from exactly at the split point
912912 gen .AddTx (swapped ) // This transaction will be swapped out at the exact height
@@ -925,18 +925,18 @@ func TestChainTxReorgs(t *testing.T) {
925925 chain , _ = GenerateChain (params .TestChainConfig , genesis , db , 5 , func (i int , gen * BlockGen ) {
926926 switch i {
927927 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 )
929929 gen .AddTx (pastAdd ) // This transaction needs to be injected during reorg
930930
931931 case 2 :
932932 gen .AddTx (postponed ) // This transaction was postponed from block #1 in the original chain
933933 gen .AddTx (swapped ) // This transaction was swapped from the exact current spot in the original chain
934934
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 )
936936 gen .AddTx (freshAdd ) // This transaction will be added exactly at reorg time
937937
938938 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 )
940940 gen .AddTx (futureAdd ) // This transaction will be added after a full reorg
941941 }
942942 })
0 commit comments