Skip to content

Commit 61fa850

Browse files
committed
refactor tx sending
Refactor sending evm txs so that we store the txs before sending and are accepting of send errors. This avoids a scenario where we send the tx, but still receive an error, perhaps because of a bad connection or other problem with the rpc provider. Implement a send queue so that the caller doesn't have to wait for the send. This should speed up ticks in core if the rpc provider is functional but slow to respond.
1 parent ae2fbd0 commit 61fa850

6 files changed

Lines changed: 271 additions & 119 deletions

File tree

client/asset/eth/deploy.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,11 @@ func (contractDeployer) nodeAndRate(
351351
return nil, nil, nil, fmt.Errorf("error creating wallet: %w", err)
352352
}
353353

354-
cl, err := newMultiRPCClient(walletDir, providers, log, chainCfg, 3, net)
354+
creds, err := walletCredentials(chainCfg.ChainID, walletDir, net)
355+
if err != nil {
356+
return nil, nil, nil, fmt.Errorf("error generating wallet credentials: %w", err)
357+
}
358+
cl, err := newMultiRPCClient(creds, providers, log, chainCfg, 3, net)
355359
if err != nil {
356360
return nil, nil, nil, fmt.Errorf("error creating rpc client: %w", err)
357361
}

0 commit comments

Comments
 (0)