rpcserver: Submit transactions directly.

This modifies the adaptor that the RPC server uses for transaction
submission to process the transaction directly instead of piping through
the netsync package.  There is no longer any reason to incur the extra
overhead since the mempool is concurrent safe the initial reasons for
piping it through netsync no longer apply.  This can be seen by noting
that the net sync manager doesn't do anything except call the mempool
method.
This commit is contained in:
Dave Collins 2021-11-23 18:11:13 -06:00
parent 71b0a793ba
commit df67eca18e
No known key found for this signature in database
GPG Key ID: B8904D9D9C93D1F2

View File

@ -351,7 +351,8 @@ func (b *rpcSyncMgr) SyncHeight() int64 {
// into the memory pool.
func (b *rpcSyncMgr) ProcessTransaction(tx *dcrutil.Tx, allowOrphans bool,
rateLimit bool, allowHighFees bool, tag mempool.Tag) ([]*dcrutil.Tx, error) {
return b.syncMgr.ProcessTransaction(tx, allowOrphans,
return b.server.txMemPool.ProcessTransaction(tx, allowOrphans,
rateLimit, allowHighFees, tag)
}