core, eth, les: fix messy code (#15367)

* core, eth, les: fix messy code

* les: fixed tx status test and rlp encoding

* core: add a workaround for light sync
This commit is contained in:
Péter Szilágyi
2017-10-25 12:18:44 +03:00
committed by GitHub
parent ca376ead88
commit 0095531a58
11 changed files with 175 additions and 203 deletions

View File

@ -97,7 +97,7 @@ type testTxPool struct {
// AddRemotes appends a batch of transactions to the pool, and notifies any
// listeners if the addition channel is non nil
func (p *testTxPool) AddRemotes(txs []*types.Transaction) error {
func (p *testTxPool) AddRemotes(txs []*types.Transaction) []error {
p.lock.Lock()
defer p.lock.Unlock()
@ -105,8 +105,7 @@ func (p *testTxPool) AddRemotes(txs []*types.Transaction) error {
if p.added != nil {
p.added <- txs
}
return nil
return make([]error, len(txs))
}
// Pending returns all the transactions known to the pool