Merge pull request #14737 from holiman/txpool_localaccounts

Txpool localaccounts
This commit is contained in:
Péter Szilágyi
2017-07-10 12:43:23 +03:00
committed by GitHub
13 changed files with 392 additions and 287 deletions

View File

@ -87,8 +87,8 @@ type BlockChain interface {
}
type txPool interface {
// AddTransactions should add the given transactions to the pool.
AddBatch([]*types.Transaction) error
// AddRemotes should add the given transactions to the pool.
AddRemotes([]*types.Transaction) error
}
type ProtocolManager struct {
@ -801,7 +801,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
return errResp(ErrRequestRejected, "")
}
if err := pm.txpool.AddBatch(txs); err != nil {
if err := pm.txpool.AddRemotes(txs); err != nil {
return errResp(ErrUnexpectedResponse, "msg: %v", err)
}