mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-10 04:15:54 +00:00
343cc4fa43
Also implements transactional block persistence. Two issues in the transaction processing code have been discovered that might affect other usages such as the CALL instruction. The main fix gets us past block 49000. You may need to clean up your database.
22 lines
739 B
Nim
22 lines
739 B
Nim
# Nimbus
|
|
# Copyright (c) 2018 Status Research & Development GmbH
|
|
# Licensed under either of
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
# at your option.
|
|
# This file may not be copied, modified, or distributed except according to
|
|
# those terms.
|
|
|
|
import
|
|
strutils,
|
|
nimcrypto, eth_common, stint, json_rpc/server,
|
|
../vm_state, ../db/[db_chain, state_db], ../constants, ../config, hexstrings
|
|
|
|
proc setupCommonRPC*(server: RpcServer) =
|
|
server.rpc("web3_clientVersion") do() -> string:
|
|
result = NimbusIdent
|
|
|
|
server.rpc("web3_sha3") do(data: HexDataStr) -> string:
|
|
var rawdata = nimcrypto.fromHex(data.string)
|
|
result = "0x" & $keccak_256.digest(rawdata)
|