Merge branch 'develop' into GRPH-59-Proposal-failure-handling
This commit is contained in:
commit
a797787f02
9 changed files with 238 additions and 231 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -12,6 +12,8 @@ hardfork.hpp
|
||||||
build_xc
|
build_xc
|
||||||
data
|
data
|
||||||
|
|
||||||
|
build
|
||||||
|
|
||||||
libraries/utilities/git_revision.cpp
|
libraries/utilities/git_revision.cpp
|
||||||
|
|
||||||
libraries/wallet/Doxyfile
|
libraries/wallet/Doxyfile
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,8 @@ RUN \
|
||||||
libssl-dev \
|
libssl-dev \
|
||||||
libtool \
|
libtool \
|
||||||
locales \
|
locales \
|
||||||
pkg-config \
|
|
||||||
ntp \
|
ntp \
|
||||||
|
pkg-config \
|
||||||
wget \
|
wget \
|
||||||
&& \
|
&& \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
|
|
@ -34,9 +34,6 @@ RUN \
|
||||||
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
|
||||||
locale-gen
|
locale-gen
|
||||||
|
|
||||||
ADD . /peerplays-core
|
|
||||||
WORKDIR /peerplays-core
|
|
||||||
|
|
||||||
# Compile Boost
|
# Compile Boost
|
||||||
RUN \
|
RUN \
|
||||||
BOOST_ROOT=$HOME/boost_1_67_0 && \
|
BOOST_ROOT=$HOME/boost_1_67_0 && \
|
||||||
|
|
@ -47,6 +44,9 @@ RUN \
|
||||||
./b2 install && \
|
./b2 install && \
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
ADD . /peerplays-core
|
||||||
|
WORKDIR /peerplays-core
|
||||||
|
|
||||||
# Compile Peerplays
|
# Compile Peerplays
|
||||||
RUN \
|
RUN \
|
||||||
BOOST_ROOT=$HOME/boost_1_67_0 && \
|
BOOST_ROOT=$HOME/boost_1_67_0 && \
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,7 @@ block_production_condition::block_production_condition_enum witness_plugin::bloc
|
||||||
break;
|
break;
|
||||||
case block_production_condition::no_private_key:
|
case block_production_condition::no_private_key:
|
||||||
ilog("Not producing block because I don't have the private key for ${scheduled_key}",
|
ilog("Not producing block because I don't have the private key for ${scheduled_key}",
|
||||||
("n", capture["n"])("t", capture["t"])("c", capture["c"]));
|
("scheduled_key", capture["scheduled_key"]));
|
||||||
break;
|
break;
|
||||||
case block_production_condition::low_participation:
|
case block_production_condition::low_participation:
|
||||||
elog("Not producing block because node appears to be on a minority fork with only ${pct}% witness participation",
|
elog("Not producing block because node appears to be on a minority fork with only ${pct}% witness participation",
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ BOOST_AUTO_TEST_CASE( test_exception_throwing_for_the_same_operation_proposed_tw
|
||||||
|
|
||||||
auto trx = make_signed_transaction_with_proposed_operation(*this, {make_transfer_operation(account_id_type(), alice_id, asset(500))});
|
auto trx = make_signed_transaction_with_proposed_operation(*this, {make_transfer_operation(account_id_type(), alice_id, asset(500))});
|
||||||
//Modifying from BOOST_CHECK to BOOST_WARN just to make sure users might confuse about this error. If any changes in network_boradcast, would recommend to revert the changes
|
//Modifying from BOOST_CHECK to BOOST_WARN just to make sure users might confuse about this error. If any changes in network_boradcast, would recommend to revert the changes
|
||||||
BOOST_WARN_THROW(db.check_tansaction_for_duplicated_operations(trx), fc::exception);
|
BOOST_WARN_THROW(db.check_tansaction_for_duplicated_operations(trx), fc::exception);
|
||||||
}
|
}
|
||||||
catch( const fc::exception& e )
|
catch( const fc::exception& e )
|
||||||
{
|
{
|
||||||
|
|
@ -195,7 +195,7 @@ BOOST_AUTO_TEST_CASE( check_fails_for_duplicated_operation_in_existed_proposal_w
|
||||||
|
|
||||||
auto trx = make_signed_transaction_with_proposed_operation(*this, {make_transfer_operation(account_id_type(), alice_id, asset(500))}); //duplicated one
|
auto trx = make_signed_transaction_with_proposed_operation(*this, {make_transfer_operation(account_id_type(), alice_id, asset(500))}); //duplicated one
|
||||||
//Modifying from BOOST_CHECK to BOOST_WARN just to make sure users might confuse about this error. If any changes in network_boradcast, would recommend to revert the changes
|
//Modifying from BOOST_CHECK to BOOST_WARN just to make sure users might confuse about this error. If any changes in network_boradcast, would recommend to revert the changes
|
||||||
BOOST_WARN_THROW(db.check_tansaction_for_duplicated_operations(trx), fc::exception);
|
BOOST_WARN_THROW(db.check_tansaction_for_duplicated_operations(trx), fc::exception);
|
||||||
}
|
}
|
||||||
catch( const fc::exception& e )
|
catch( const fc::exception& e )
|
||||||
{
|
{
|
||||||
|
|
@ -230,7 +230,7 @@ BOOST_AUTO_TEST_CASE( check_fails_for_same_member_create_operations )
|
||||||
|
|
||||||
auto trx = make_signed_transaction_with_proposed_operation(*this, {make_committee_member_create_operation(asset(1000), account_id_type(), "test url")});
|
auto trx = make_signed_transaction_with_proposed_operation(*this, {make_committee_member_create_operation(asset(1000), account_id_type(), "test url")});
|
||||||
//Modifying from BOOST_CHECK to BOOST_WARN just to make sure users might confuse about this error. If any changes in network_boradcast, would recommend to revert the changes
|
//Modifying from BOOST_CHECK to BOOST_WARN just to make sure users might confuse about this error. If any changes in network_boradcast, would recommend to revert the changes
|
||||||
BOOST_WARN_THROW(db.check_tansaction_for_duplicated_operations(trx), fc::exception);
|
BOOST_WARN_THROW(db.check_tansaction_for_duplicated_operations(trx), fc::exception);
|
||||||
}
|
}
|
||||||
catch( const fc::exception& e )
|
catch( const fc::exception& e )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1561,6 +1561,7 @@ BOOST_AUTO_TEST_CASE( vesting_balance_create_test )
|
||||||
op.amount = test_asset.amount( 100 );
|
op.amount = test_asset.amount( 100 );
|
||||||
//op.vesting_seconds = 60*60*24;
|
//op.vesting_seconds = 60*60*24;
|
||||||
op.policy = cdd_vesting_policy_initializer{ 60*60*24 };
|
op.policy = cdd_vesting_policy_initializer{ 60*60*24 };
|
||||||
|
//op.balance_type == vesting_balance_type::unspecified;
|
||||||
|
|
||||||
// Fee must be non-negative
|
// Fee must be non-negative
|
||||||
REQUIRE_OP_VALIDATION_SUCCESS( op, fee, core.amount(1) );
|
REQUIRE_OP_VALIDATION_SUCCESS( op, fee, core.amount(1) );
|
||||||
|
|
@ -1580,6 +1581,7 @@ BOOST_AUTO_TEST_CASE( vesting_balance_create_test )
|
||||||
|
|
||||||
op.creator = alice_account.get_id();
|
op.creator = alice_account.get_id();
|
||||||
op.owner = alice_account.get_id();
|
op.owner = alice_account.get_id();
|
||||||
|
//op.balance_type = vesting_balance_type::unspecified;
|
||||||
|
|
||||||
account_id_type nobody = account_id_type(1234);
|
account_id_type nobody = account_id_type(1234);
|
||||||
|
|
||||||
|
|
@ -1650,6 +1652,7 @@ BOOST_AUTO_TEST_CASE( vesting_balance_withdraw_test )
|
||||||
create_op.owner = owner;
|
create_op.owner = owner;
|
||||||
create_op.amount = amount;
|
create_op.amount = amount;
|
||||||
create_op.policy = cdd_vesting_policy_initializer(vesting_seconds);
|
create_op.policy = cdd_vesting_policy_initializer(vesting_seconds);
|
||||||
|
//create_op.balance_type = vesting_balance_type::unspecified;
|
||||||
tx.operations.push_back( create_op );
|
tx.operations.push_back( create_op );
|
||||||
set_expiration( db, tx );
|
set_expiration( db, tx );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1316,6 +1316,7 @@ BOOST_AUTO_TEST_CASE(zero_second_vbo)
|
||||||
create_op.owner = alice_id;
|
create_op.owner = alice_id;
|
||||||
create_op.amount = asset(500);
|
create_op.amount = asset(500);
|
||||||
create_op.policy = pinit;
|
create_op.policy = pinit;
|
||||||
|
//create_op.balance_type = vesting_balance_type::unspecified;
|
||||||
|
|
||||||
signed_transaction create_tx;
|
signed_transaction create_tx;
|
||||||
create_tx.operations.push_back( create_op );
|
create_tx.operations.push_back( create_op );
|
||||||
|
|
@ -1399,6 +1400,7 @@ BOOST_AUTO_TEST_CASE( vbo_withdraw_different )
|
||||||
create_op.owner = alice_id;
|
create_op.owner = alice_id;
|
||||||
create_op.amount = asset(100, stuff_id);
|
create_op.amount = asset(100, stuff_id);
|
||||||
create_op.policy = pinit;
|
create_op.policy = pinit;
|
||||||
|
//create_op.balance_type = vesting_balance_type::unspecified;
|
||||||
|
|
||||||
signed_transaction create_tx;
|
signed_transaction create_tx;
|
||||||
create_tx.operations.push_back( create_op );
|
create_tx.operations.push_back( create_op );
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue