diff options
author | Determinant <[email protected]> | 2019-09-24 12:55:57 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2019-09-24 12:55:57 -0400 |
commit | fc9229d7d25dafe2eb37965115888d17e473ebe4 (patch) | |
tree | 251fde169b5f35dbbf27e720b98393e3a8165634 /eth/api_backend.go | |
parent | 215fec775fc457fb69d77fd0fc128893721fa34e (diff) |
enable AccountManager; add a channel to notify new txs
Diffstat (limited to 'eth/api_backend.go')
-rw-r--r-- | eth/api_backend.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/eth/api_backend.go b/eth/api_backend.go index 7befd96..f4c0101 100644 --- a/eth/api_backend.go +++ b/eth/api_backend.go @@ -160,7 +160,12 @@ func (b *EthAPIBackend) SubscribeLogsEvent(ch chan<- []*types.Log) event.Subscri } func (b *EthAPIBackend) SendTx(ctx context.Context, signedTx *types.Transaction) error { - return b.eth.txPool.AddLocal(signedTx) + err := b.eth.txPool.AddLocal(signedTx) + select { + case b.eth.txSubmitChan <- struct{}{}: + default: + } + return err } func (b *EthAPIBackend) GetPoolTransactions() (types.Transactions, error) { |