From 41c03e07c6ad09b30c336c929442087618fefd66 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 --- dex/api_backend.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dex') diff --git a/dex/api_backend.go b/dex/api_backend.go index 9929b062d..80fe1e39b 100644 --- a/dex/api_backend.go +++ b/dex/api_backend.go @@ -154,6 +154,10 @@ func (b *DexAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) return b.dex.txPool.AddLocal(signedTx) } +func (b *DexAPIBackend) SendTxs(ctx context.Context, signedTxs []*types.Transaction) []error { + return b.dex.txPool.AddLocals(signedTxs) +} + func (b *DexAPIBackend) GetPoolTransactions() (types.Transactions, error) { pending, err := b.dex.txPool.Pending() if err != nil { -- cgit v1.2.3