all: update light logs (and a few others) to the new model

This commit is contained in:
Péter Szilágyi
2017-03-03 11:41:52 +02:00
parent faf713632c
commit e7030c4bf5
22 changed files with 285 additions and 341 deletions

View File

@ -19,7 +19,6 @@ package light
import (
"bytes"
"errors"
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/common"
@ -27,7 +26,6 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/rlp"
"golang.org/x/net/context"
)
@ -149,7 +147,6 @@ func GetBody(ctx context.Context, odr OdrBackend, hash common.Hash, number uint6
}
body := new(types.Body)
if err := rlp.Decode(bytes.NewReader(data), body); err != nil {
log.Error(fmt.Sprintf("invalid block body RLP for hash %x: %v", hash, err))
return nil, err
}
return body, nil
@ -181,7 +178,6 @@ func GetBlockReceipts(ctx context.Context, odr OdrBackend, hash common.Hash, num
r := &ReceiptsRequest{Hash: hash, Number: number}
if err := odr.Retrieve(ctx, r); err != nil {
return nil, err
} else {
return r.Receipts, nil
}
return r.Receipts, nil
}