mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
eth: fix SendTx
This commit is contained in:
parent
b853a2f50c
commit
b4525261d3
1 changed files with 11 additions and 7 deletions
|
|
@ -134,13 +134,17 @@ func TestSendTx(t *testing.T) {
|
|||
func testSendTx(t *testing.T, withLocal bool) {
|
||||
b := initBackend(withLocal)
|
||||
|
||||
txA := pricedSetCodeTx(0, 250000, uint256.NewInt(params.GWei), uint256.NewInt(params.GWei), key, []unsignedAuth{
|
||||
{
|
||||
nonce: 0,
|
||||
key: key,
|
||||
},
|
||||
})
|
||||
b.SendTx(context.Background(), txA)
|
||||
txA := pricedSetCodeTx(0, 250000, uint256.NewInt(params.GWei), uint256.NewInt(params.GWei), key, []unsignedAuth{{nonce: 0, key: key}})
|
||||
if err := b.SendTx(context.Background(), txA); err != nil {
|
||||
t.Fatalf("Failed to submit tx: %v", err)
|
||||
}
|
||||
for {
|
||||
pending, _ := b.TxPool().ContentFrom(address)
|
||||
if len(pending) == 1 {
|
||||
break
|
||||
}
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
|
||||
txB := makeTx(1, nil, nil, key)
|
||||
err := b.SendTx(context.Background(), txB)
|
||||
|
|
|
|||
Loading…
Reference in a new issue