Skip to content

Commit

Permalink
Merge branch 'dev_master' into testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
zuuluuz committed Mar 15, 2019
2 parents 2ad988c + a2844a1 commit 0877b95
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
8 changes: 7 additions & 1 deletion libraries/chain/include/graphene/chain/apply_context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,20 @@ class apply_context {

void update(int iterator, account_name payer, secondary_key_proxy_const_type secondary)
{
if(context._db->head_block_time() > HARDFORK_1021_TIME) {//can be removed after release online
context.check_payer_permission(payer);
}

const auto &obj = itr_cache.get(iterator);

const auto &table_obj = itr_cache.get_table(obj.t_id);
FC_ASSERT(table_obj.code == context.receiver, "db access violation");

context._db->modify(obj, [&](ObjectType &o) {
secondary_key_helper_t::set(o.secondary_key, secondary);
o.payer = payer;
if(context._db->head_block_time() <= HARDFORK_1021_TIME) {//this can be removed after release online, the operation o.payer = payer should remove also
o.payer = payer;
}
});
}

Expand Down
5 changes: 5 additions & 0 deletions libraries/chain/include/graphene/chain/hardfork.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@
#define HARDFORK_1020_TIME (fc::time_point_sec( 1552381200 )) // for testnet, 2019-03-12T08:00:00(UTC)
#endif

#ifndef HARDFORK_1021_TIME
// for testnet after this time can be remove contract table
#define HARDFORK_1021_TIME (fc::time_point_sec( 1553040000 )) // for testnet, 2019-03-15T00:00:00(UTC)
#endif

// #413 Add operation to claim asset fees
#ifndef HARDFORK_413_TIME
#define HARDFORK_413_TIME (fc::time_point_sec( 1446652800 ))
Expand Down
2 changes: 1 addition & 1 deletion libraries/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@
auto action_type = abis.get_action_type(method);
GRAPHENE_ASSERT(!action_type.empty(), action_validate_exception, "Unknown action ${action} in contract ${contract}", ("action", method)("contract", contract));
contract_call_op.data = abis.variant_to_binary(action_type, action_args_var, fc::milliseconds(1000000));
contract_call_op.fee = asset{0, asset_id_type(1)};
contract_call_op.fee = (get_dynamic_global_properties().time > HARDFORK_1008_TIME) ? asset{0, asset_id_type(1)} : asset{0, asset_id_type(0)};

signed_transaction tx;
tx.operations.push_back(contract_call_op);
Expand Down
12 changes: 6 additions & 6 deletions script/gxchain_testnet_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ if [ "$ARCH" == "Linux" ]; then
OS_VERSION=$(lsb_release -a | grep "Release" | sed -e 's/Release:[\t]*//g')
echo "Your OS Version: Ubuntu ${OS_VERSION}"
if [ "$OS_VERSION" = "14.04" ]; then
curl -L 'https://github.com/gxchain/gxb-core/releases/download/testnet-1.0.190222/gxb_1.0.190222-ubuntu-14.04.testnet.tar.gz' -o gxb_1.0.190222-ubuntu-14.04.testnet.tar.gz
tar zxvf gxb_1.0.190222-ubuntu-14.04.testnet.tar.gz
curl -L 'https://github.com/gxchain/gxb-core/releases/download/testnet-1.0.190311/gxb_1.0.190311-ubuntu-14.04.testnet.tar.gz' -o gxb_1.0.190311-ubuntu-14.04.testnet.tar.gz
tar zxvf gxb_1.0.190311-ubuntu-14.04.testnet.tar.gz
else
curl -L 'https://github.com/gxchain/gxb-core/releases/download/testnet-1.0.190222/gxb_1.0.190222-ubuntu-14.04.testnet.tar.gz' -o gxb_1.0.190222-ubuntu-16.04.testnet.tar.gz
tar zxvf gxb_1.0.190222-ubuntu-16.04.testnet.tar.gz
curl -L 'https://github.com/gxchain/gxb-core/releases/download/testnet-1.0.190311/gxb_1.0.190311-ubuntu-14.04.testnet.tar.gz' -o gxb_1.0.190311-ubuntu-16.04.testnet.tar.gz
tar zxvf gxb_1.0.190311-ubuntu-16.04.testnet.tar.gz
fi
elif [ "$ARCH" == "Darwin" ]; then
curl -L 'https://github.com/gxchain/gxb-core/releases/download/testnet-1.0.190222/gxb_1.0.190222-osx.testnet.tar.gz' -o gxb_1.0.190222-osx.testnet.tar.gz
tar zxvf gxb_1.0.190222-osx.testnet.tar.gz
curl -L 'https://github.com/gxchain/gxb-core/releases/download/testnet-1.0.190311/gxb_1.0.190311-osx.testnet.tar.gz' -o gxb_1.0.190311-osx.testnet.tar.gz
tar zxvf gxb_1.0.190311-osx.testnet.tar.gz
else
printf "\\n\\tGXChain core currently supports macOS & Ubuntu Linux only.\\n"
exit 1
Expand Down

0 comments on commit 0877b95

Please sign in to comment.