Addressing PR review

This commit is contained in:
jangko 2024-07-01 19:30:53 +07:00
parent ef8a065fb8
commit f12cac0275
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 4 additions and 5 deletions

View File

@ -19,8 +19,6 @@ import
../beacon/web3_eth_conv,
./rpc_types
{.push raises: [].}
type
ServerAPIRef = ref object
com: CommonRef
@ -30,9 +28,10 @@ const
defaultTag = blockId("latest")
func newServerAPI*(c: ForkedChainRef): ServerAPIRef =
new(result)
result.com = c.com
result.chain = c
ServerAPIRef(
com: c.com,
chain: c,
)
proc headerFromTag(api: ServerAPIRef, blockTag: BlockTag): Result[common.BlockHeader, string] =
if blockTag.kind == bidAlias: