Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stable to beta #1908

Merged
merged 15 commits into from
May 30, 2024
2 changes: 1 addition & 1 deletion libethereum/ClientBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ class ClientBase : public Interface {
using Interface::blockInfo; // for another overload
using Interface::transactionHashes;
using Interface::uncle;
using Interface::uncleCount;
using Interface::uncleHashes;

h256 hashFromNumber( BlockNumber _number ) const override;
Expand Down Expand Up @@ -152,7 +153,6 @@ class ClientBase : public Interface {
}
return transactionCount( hashFromNumber( _block ) );
}
using Interface::uncleCount;
unsigned uncleCount( h256 _blockHash ) const override;
unsigned number() const override;
h256s pendingHashes() const override;
Expand Down
2 changes: 1 addition & 1 deletion test/unittests/libethereum/ClientTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ using namespace dev::test;
using namespace dev::p2p;
namespace fs = boost::filesystem;

static size_t rand_port = 1024 + rand() % 64000;
static size_t rand_port = ( srand(time(nullptr)), 1024 + rand() % 64000 );

struct FixtureCommon {
const string BTRFS_FILE_PATH = "btrfs.file";
Expand Down
7 changes: 4 additions & 3 deletions test/unittests/libweb3jsonrpc/jsonrpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ JsonRpcFixture( const std::string& _config = "", bool _owner = true,
serverOpts.netOpts_.bindOptsStandard_.cntServers_ = 1;
serverOpts.netOpts_.bindOptsStandard_.strAddrHTTP4_ = chainParams.nodeInfo.ip;
// random port
serverOpts.netOpts_.bindOptsStandard_.nBasePortHTTP4_ = std::rand() % 64000 + 1025;
// +3 because rand() seems to be called effectively simultaneously here and in "static" section - thus giving same port for consensus
serverOpts.netOpts_.bindOptsStandard_.nBasePortHTTP4_ = std::rand() % 64000 + 1025 + 3;
std::cout << "PORT: " << serverOpts.netOpts_.bindOptsStandard_.nBasePortHTTP4_ << std::endl;
skale_server_connector = new SkaleServerOverride( chainParams, client.get(), serverOpts );
rpcServer->addConnector( skale_server_connector );
Expand Down Expand Up @@ -846,7 +847,7 @@ BOOST_AUTO_TEST_CASE( simple_contract ) {
// }
// }

string compiled =
string compiled =
"608060405234801561001057600080fd5b506101ef8061002060003"
"96000f3fe608060405234801561001057600080fd5b506004361061"
"00365760003560e01c8063552410771461003b578063b3de648b146"
Expand Down Expand Up @@ -4075,7 +4076,7 @@ BOOST_AUTO_TEST_CASE( cached_filestorage ) {
auto _config = c_genesisConfigString;
Json::Value ret;
Json::Reader().parse( _config, ret );
ret["skaleConfig"]["sChain"]["revertableFSPatchTimestamp"] = 1;
ret["skaleConfig"]["sChain"]["revertableFSPatchTimestamp"] = 1;
Json::FastWriter fastWriter;
std::string config = fastWriter.write( ret );
RestrictedAddressFixture fixture( config );
Expand Down
Loading