From 4a02390bfefc00e3c1b3e70a59f8e2c19f5f1dd8 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Fri, 23 Nov 2018 12:12:10 +0800 Subject: api: allow sending batch of raw transactions --- eth/api_backend.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'eth') diff --git a/eth/api_backend.go b/eth/api_backend.go index b8a525f02..32faea206 100644 --- a/eth/api_backend.go +++ b/eth/api_backend.go @@ -157,6 +157,10 @@ func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) return b.eth.txPool.AddLocal(signedTx) } +func (b *EthAPIBackend) SendTxs(ctx context.Context, signedTxs []*types.Transaction) []error { + return b.eth.txPool.AddLocals(signedTxs) +} + func (b *EthAPIBackend) GetPoolTransactions() (types.Transactions, error) { pending, err := b.eth.txPool.Pending() if err != nil { -- cgit