func FromBlockRLP(r io.Reader) (*EthBlock, []*EthTx, []*EthTxTrie, error) {
	rawdata, err := ioutil.ReadAll(r)
	if err != nil {
		return nil, nil, nil, err
	}
	var decodedBlock types.Block
	err = rlp.Decode(bytes.NewBuffer(rawdata), &decodedBlock)
	if err != nil {
		if err.Error()[:41] != "rlp: expected input list for types.Header" {
			return nil, nil, nil, err
		}
		var decodedHeader types.Header
		err := rlp.Decode(bytes.NewBuffer(rawdata), &decodedHeader)
		if err != nil {
			return nil, nil, nil, err
		}
		return &EthBlock{
			Header:  &decodedHeader,
			cid:     rawdataToCid(MEthBlock, rawdata),
			rawdata: rawdata,
		}, nil, nil, nil
	}
	headerRawData := getRLP(decodedBlock.Header())
	ethBlock := &EthBlock{
		Header:  decodedBlock.Header(),
		cid:     rawdataToCid(MEthBlock, headerRawData),
		rawdata: headerRawData,
	}
	ethTxNodes, ethTxTrieNodes, err := processTransactions(decodedBlock.Transactions(),
		decodedBlock.Header().TxHash[:])
	if err != nil {
		return nil, nil, nil, err
	}
	return ethBlock, ethTxNodes, ethTxTrieNodes, nil
}
/*
INPUT

FromBlockRLP takes an RLP message representing
an ethereum block header or body (header, ommers and txs)
to return it as a set of IPLD nodes for further processing.
package ipldeth
import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"io/ioutil"
	cid "github.com/ipfs/go-cid"
	node "github.com/ipfs/go-ipld-format"
	"github.com/ethereum/go-ethereum/common"
	types "github.com/ethereum/go-ethereum/core/types"
	rlp "github.com/ethereum/go-ethereum/rlp"
)
type EthBlock struct {
	*types.Header
	cid     *cid.Cid
	rawdata []byte
}
var _ node.Node = (*EthBlock)(nil)