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 --- dex/api_backend.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dex/api_backend.go') diff --git a/dex/api_backend.go b/dex/api_backend.go index 0c8dfdb8a..c00a54145 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