Skip to content

Commit

Permalink
post-merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yperbasis committed Jul 26, 2023
1 parent e73a36b commit 4aa09d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions silkworm/core/types/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@

#include "transaction.hpp"

#include <bit>

#include <ethash/keccak.hpp>

#include <silkworm/core/common/cast.hpp>
#include <silkworm/core/common/util.hpp>
#include <silkworm/core/crypto/ecdsa.h>
#include <silkworm/core/protocol/param.hpp>
Expand Down Expand Up @@ -46,7 +47,7 @@ bool Transaction::set_v(const intx::uint256& v) {
evmc::bytes32 Transaction::hash() const {
Bytes rlp;
rlp::encode(rlp, *this, /*wrap_eip2718_into_string=*/false);
return bit_cast<evmc_bytes32>(keccak256(rlp));
return std::bit_cast<evmc_bytes32>(keccak256(rlp));
}

namespace rlp {
Expand Down
7 changes: 3 additions & 4 deletions silkworm/silkrpc/commands/rpc_api_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include "rpc_api.hpp"

#include <bit>
#include <filesystem>
#include <fstream>
#include <iostream>
Expand All @@ -33,13 +34,11 @@
#include <silkworm/infra/common/directories.hpp>
#include <silkworm/node/db/access_layer.hpp>
#include <silkworm/node/db/genesis.hpp>
#include <silkworm/silkrpc/common/constants.hpp>
#include <silkworm/silkrpc/ethdb/file/local_database.hpp>
#include <silkworm/silkrpc/http/request_handler.hpp>
#include <silkworm/silkrpc/test/context_test_base.hpp>

#include "silkworm/core/common/cast.hpp"
#include "silkworm/silkrpc/common/constants.hpp"

namespace silkworm::rpc::commands {

using boost::asio::awaitable;
Expand Down Expand Up @@ -85,7 +84,7 @@ void populate_genesis(db::RWTxn& txn) {

if (account_alloc_json.contains("code")) {
const auto acc_code{from_hex(std::string(account_alloc_json.at("code"))).value()};
const auto acc_codehash{bit_cast<evmc_bytes32>(keccak256(acc_code))};
const auto acc_codehash{std::bit_cast<evmc_bytes32>(keccak256(acc_code))};
account.code_hash = acc_codehash;
state_buffer.update_account_code(account_address, account.incarnation, acc_codehash, acc_code);
}
Expand Down

0 comments on commit 4aa09d1

Please sign in to comment.