@@ -620,7 +620,7 @@ func TestFastVsFullChains(t *testing.T) {
620
620
// If the block number is multiple of 3, send a few bonus transactions to the miner
621
621
if i % 3 == 2 {
622
622
for j := 0 ; j < i % 4 + 1 ; j ++ {
623
- tx , err := types .SignTx (types .NewTransaction (block .TxNonce (address ), common.Address {0x00 }, big .NewInt (1000 ), params .TxGas , nil , nil ), signer , key )
623
+ tx , err := types .SignTx (types .NewTransaction (block .TxNonce (address ), common.Address {0x00 }, big .NewInt (1000 ), params .TxGas , nil , nil , nil ), signer , key )
624
624
if err != nil {
625
625
panic (err )
626
626
}
@@ -793,8 +793,8 @@ func TestChainTxReorgs(t *testing.T) {
793
793
// Create two transactions shared between the chains:
794
794
// - postponed: transaction included at a later block in the forked chain
795
795
// - swapped: transaction included at the same block number in the forked chain
796
- postponed , _ := types .SignTx (types .NewTransaction (0 , addr1 , big .NewInt (1000 ), params .TxGas , nil , nil ), signer , key1 )
797
- swapped , _ := types .SignTx (types .NewTransaction (1 , addr1 , big .NewInt (1000 ), params .TxGas , nil , nil ), signer , key1 )
796
+ postponed , _ := types .SignTx (types .NewTransaction (0 , addr1 , big .NewInt (1000 ), params .TxGas , nil , nil , nil ), signer , key1 )
797
+ swapped , _ := types .SignTx (types .NewTransaction (1 , addr1 , big .NewInt (1000 ), params .TxGas , nil , nil , nil ), signer , key1 )
798
798
799
799
// Create two transactions that will be dropped by the forked chain:
800
800
// - pastDrop: transaction dropped retroactively from a past block
@@ -810,13 +810,13 @@ func TestChainTxReorgs(t *testing.T) {
810
810
chain , _ := GenerateChain (gspec .Config , genesis , ethash .NewFaker (), db , 3 , func (i int , gen * BlockGen ) {
811
811
switch i {
812
812
case 0 :
813
- pastDrop , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr2 ), addr2 , big .NewInt (1000 ), params .TxGas , nil , nil ), signer , key2 )
813
+ pastDrop , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr2 ), addr2 , big .NewInt (1000 ), params .TxGas , nil , nil , nil ), signer , key2 )
814
814
815
815
gen .AddTx (pastDrop ) // This transaction will be dropped in the fork from below the split point
816
816
gen .AddTx (postponed ) // This transaction will be postponed till block #3 in the fork
817
817
818
818
case 2 :
819
- freshDrop , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr2 ), addr2 , big .NewInt (1000 ), params .TxGas , nil , nil ), signer , key2 )
819
+ freshDrop , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr2 ), addr2 , big .NewInt (1000 ), params .TxGas , nil , nil , nil ), signer , key2 )
820
820
821
821
gen .AddTx (freshDrop ) // This transaction will be dropped in the fork from exactly at the split point
822
822
gen .AddTx (swapped ) // This transaction will be swapped out at the exact height
@@ -835,18 +835,18 @@ func TestChainTxReorgs(t *testing.T) {
835
835
chain , _ = GenerateChain (gspec .Config , genesis , ethash .NewFaker (), db , 5 , func (i int , gen * BlockGen ) {
836
836
switch i {
837
837
case 0 :
838
- pastAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), params .TxGas , nil , nil ), signer , key3 )
838
+ pastAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), params .TxGas , nil , nil , nil ), signer , key3 )
839
839
gen .AddTx (pastAdd ) // This transaction needs to be injected during reorg
840
840
841
841
case 2 :
842
842
gen .AddTx (postponed ) // This transaction was postponed from block #1 in the original chain
843
843
gen .AddTx (swapped ) // This transaction was swapped from the exact current spot in the original chain
844
844
845
- freshAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), params .TxGas , nil , nil ), signer , key3 )
845
+ freshAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), params .TxGas , nil , nil , nil ), signer , key3 )
846
846
gen .AddTx (freshAdd ) // This transaction will be added exactly at reorg time
847
847
848
848
case 3 :
849
- futureAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), params .TxGas , nil , nil ), signer , key3 )
849
+ futureAdd , _ = types .SignTx (types .NewTransaction (gen .TxNonce (addr3 ), addr3 , big .NewInt (1000 ), params .TxGas , nil , nil , nil ), signer , key3 )
850
850
gen .AddTx (futureAdd ) // This transaction will be added after a full reorg
851
851
}
852
852
})
@@ -903,7 +903,7 @@ func TestLogReorgs(t *testing.T) {
903
903
blockchain .SubscribeRemovedLogsEvent (rmLogsCh )
904
904
chain , _ := GenerateChain (params .TestChainConfig , genesis , ethash .NewFaker (), db , 2 , func (i int , gen * BlockGen ) {
905
905
if i == 1 {
906
- tx , err := types .SignTx (types .NewContractCreation (gen .TxNonce (addr1 ), new (big.Int ), 1000000 , new (big.Int ), code ), signer , key1 )
906
+ tx , err := types .SignTx (types .NewContractCreation (gen .TxNonce (addr1 ), new (big.Int ), 1000000 , new (big.Int ), nil , code ), signer , key1 )
907
907
if err != nil {
908
908
t .Fatalf ("failed to create tx: %v" , err )
909
909
}
@@ -952,7 +952,7 @@ func TestReorgSideEvent(t *testing.T) {
952
952
}
953
953
954
954
replacementBlocks , _ := GenerateChain (gspec .Config , genesis , ethash .NewFaker (), db , 4 , func (i int , gen * BlockGen ) {
955
- tx , err := types .SignTx (types .NewContractCreation (gen .TxNonce (addr1 ), new (big.Int ), 1000000 , new (big.Int ), nil ), signer , key1 )
955
+ tx , err := types .SignTx (types .NewContractCreation (gen .TxNonce (addr1 ), new (big.Int ), 1000000 , new (big.Int ), nil , nil ), signer , key1 )
956
956
if i == 2 {
957
957
gen .OffsetTime (- 9 )
958
958
}
@@ -1080,7 +1080,7 @@ func TestEIP155Transition(t *testing.T) {
1080
1080
tx * types.Transaction
1081
1081
err error
1082
1082
basicTx = func (signer types.Signer ) (* types.Transaction , error ) {
1083
- return types .SignTx (types .NewTransaction (block .TxNonce (address ), common.Address {}, new (big.Int ), 21000 , new (big.Int ), nil ), signer , key )
1083
+ return types .SignTx (types .NewTransaction (block .TxNonce (address ), common.Address {}, new (big.Int ), 21000 , new (big.Int ), nil , nil ), signer , key )
1084
1084
}
1085
1085
)
1086
1086
switch i {
@@ -1143,7 +1143,7 @@ func TestEIP155Transition(t *testing.T) {
1143
1143
tx * types.Transaction
1144
1144
err error
1145
1145
basicTx = func (signer types.Signer ) (* types.Transaction , error ) {
1146
- return types .SignTx (types .NewTransaction (block .TxNonce (address ), common.Address {}, new (big.Int ), 21000 , new (big.Int ), nil ), signer , key )
1146
+ return types .SignTx (types .NewTransaction (block .TxNonce (address ), common.Address {}, new (big.Int ), 21000 , new (big.Int ), nil , nil ), signer , key )
1147
1147
}
1148
1148
)
1149
1149
if i == 0 {
@@ -1190,11 +1190,11 @@ func TestEIP161AccountRemoval(t *testing.T) {
1190
1190
)
1191
1191
switch i {
1192
1192
case 0 :
1193
- tx , err = types .SignTx (types .NewTransaction (block .TxNonce (address ), theAddr , new (big.Int ), 21000 , new (big.Int ), nil ), signer , key )
1193
+ tx , err = types .SignTx (types .NewTransaction (block .TxNonce (address ), theAddr , new (big.Int ), 21000 , new (big.Int ), nil , nil ), signer , key )
1194
1194
case 1 :
1195
- tx , err = types .SignTx (types .NewTransaction (block .TxNonce (address ), theAddr , new (big.Int ), 21000 , new (big.Int ), nil ), signer , key )
1195
+ tx , err = types .SignTx (types .NewTransaction (block .TxNonce (address ), theAddr , new (big.Int ), 21000 , new (big.Int ), nil , nil ), signer , key )
1196
1196
case 2 :
1197
- tx , err = types .SignTx (types .NewTransaction (block .TxNonce (address ), theAddr , new (big.Int ), 21000 , new (big.Int ), nil ), signer , key )
1197
+ tx , err = types .SignTx (types .NewTransaction (block .TxNonce (address ), theAddr , new (big.Int ), 21000 , new (big.Int ), nil , nil ), signer , key )
1198
1198
}
1199
1199
if err != nil {
1200
1200
t .Fatal (err )
@@ -1403,7 +1403,7 @@ func benchmarkLargeNumberOfValueToNonexisting(b *testing.B, numTxs, numBlocks in
1403
1403
uniq := uint64 (i * numTxs + txi )
1404
1404
recipient := recipientFn (uniq )
1405
1405
//recipient := common.BigToAddress(big.NewInt(0).SetUint64(1337 + uniq))
1406
- tx , err := types .SignTx (types .NewTransaction (uniq , recipient , big .NewInt (1 ), params .TxGas , big .NewInt (1 ), nil ), signer , testBankKey )
1406
+ tx , err := types .SignTx (types .NewTransaction (uniq , recipient , big .NewInt (1 ), params .TxGas , big .NewInt (1 ), nil , nil ), signer , testBankKey )
1407
1407
if err != nil {
1408
1408
b .Error (err )
1409
1409
}
0 commit comments