@@ -1340,7 +1340,7 @@ func RPCMarshalHeader(head *types.Header) map[string]interface{} {
13401340// RPCMarshalBlock converts the given block to the RPC output which depends on fullTx. If inclTx is true transactions are
13411341// returned. When fullTx is true the returned block contains full transaction details, otherwise it will only contain
13421342// transaction hashes.
1343- func RPCMarshalBlock (block * types.Block , inclTx bool , fullTx bool , config * params.ChainConfig ) ( map [string ]interface {}, error ) {
1343+ func RPCMarshalBlock (block * types.Block , inclTx bool , fullTx bool , config * params.ChainConfig ) map [string ]interface {} {
13441344 fields := RPCMarshalHeader (block .Header ())
13451345 fields ["size" ] = hexutil .Uint64 (block .Size ())
13461346
@@ -1366,20 +1366,17 @@ func RPCMarshalBlock(block *types.Block, inclTx bool, fullTx bool, config *param
13661366 uncleHashes [i ] = uncle .Hash ()
13671367 }
13681368 fields ["uncles" ] = uncleHashes
1369- return fields , nil
1369+ return fields
13701370}
13711371
13721372// rpcMarshalBlock uses the generalized output filler, then adds the total difficulty field, which requires
13731373// a `BlockChainAPI`.
13741374func (s * BlockChainAPI ) rpcMarshalBlock (ctx context.Context , b * types.Block , inclTx bool , fullTx bool ) (map [string ]interface {}, error ) {
1375- fields , err := RPCMarshalBlock (b , inclTx , fullTx , s .b .ChainConfig ())
1376- if err != nil {
1377- return nil , err
1378- }
1375+ fields := RPCMarshalBlock (b , inclTx , fullTx , s .b .ChainConfig ())
13791376 if inclTx {
13801377 fields ["totalDifficulty" ] = (* hexutil .Big )(s .b .GetTd (ctx , b .Hash ()))
13811378 }
1382- return fields , err
1379+ return fields , nil
13831380}
13841381
13851382// findNearestSignedBlock finds the nearest checkpoint from input block
0 commit comments