From a06955b38e85ba408eadc889bc64f5d523e142b7 Mon Sep 17 00:00:00 2001 From: Bucky Kittinger Date: Wed, 11 Jul 2018 18:30:52 -0400 Subject: [PATCH 1/3] Point to correct wasmsdk tag --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 37c721125..4aebc8a61 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ The following unpriviledged contract(s) are also part of the system. Dependencies: * [eosio v1.0.8](https://github.com/eosio/eos/tree/v1.0.8) -* [eosio.wasmsdk v1.0](https://github.com/eosio/eosio.wasmsdk/tree/v1.0) +* [eosio.wasmsdk v1.0.0](https://github.com/eosio/eosio.wasmsdk/tree/v1.0.0) To build the contracts and the unit tests: * First, ensure that your __eosio__ is compiled to the core symbol for the EOSIO blockchain that intend to deploy to. From b30a7b3773a4a10a99d0dab1c76c2757ce6ea7c2 Mon Sep 17 00:00:00 2001 From: Anton Perkov Date: Thu, 19 Jul 2018 16:50:41 -0400 Subject: [PATCH 2/3] use lower_bound to find top open bid #21 --- eosio.system/src/producer_pay.cpp | 2 +- tests/eosio.system_tester.hpp | 1 + tests/eosio.system_tests.cpp | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/eosio.system/src/producer_pay.cpp b/eosio.system/src/producer_pay.cpp index 39fe64efc..84e2444ad 100644 --- a/eosio.system/src/producer_pay.cpp +++ b/eosio.system/src/producer_pay.cpp @@ -50,7 +50,7 @@ namespace eosiosystem { if( (timestamp.slot - _gstate.last_name_close.slot) > blocks_per_day ) { name_bid_table bids(_self,_self); auto idx = bids.get_index(); - auto highest = idx.begin(); + auto highest = idx.lower_bound( std::numeric_limits::max()/2 ); if( highest != idx.end() && highest->high_bid > 0 && highest->last_bid_time < (current_time() - useconds_per_day) && diff --git a/tests/eosio.system_tester.hpp b/tests/eosio.system_tester.hpp index 7ce52211c..d2896a39c 100644 --- a/tests/eosio.system_tester.hpp +++ b/tests/eosio.system_tester.hpp @@ -518,6 +518,7 @@ class eosio_system_tester : public TESTER { trx.sign( get_private_key( config::system_account_name, "active" ), control->get_chain_id() ); trx.sign( get_private_key( N(producer1111), "active" ), control->get_chain_id() ); push_transaction( trx ); + produce_block(); } } diff --git a/tests/eosio.system_tests.cpp b/tests/eosio.system_tests.cpp index ac21342b7..b8f5380da 100644 --- a/tests/eosio.system_tests.cpp +++ b/tests/eosio.system_tests.cpp @@ -2367,6 +2367,21 @@ BOOST_FIXTURE_TEST_CASE( multiple_namebids, eosio_system_tester ) try { } FC_LOG_AND_RETHROW() +BOOST_FIXTURE_TEST_CASE( namebid_pending_winner, eosio_system_tester ) try { + cross_15_percent_threshold(); + produce_block( fc::hours(14*24) ); //wait 14 day for name auction activation + transfer( config::system_account_name, N(alice1111111), core_from_string("10000.0000") ); + transfer( config::system_account_name, N(bob111111111), core_from_string("10000.0000") ); + + BOOST_REQUIRE_EQUAL( success(), bidname( "alice1111111", "prefa", core_from_string( "50.0000" ) )); + BOOST_REQUIRE_EQUAL( success(), bidname( "bob111111111", "prefb", core_from_string( "30.0000" ) )); + produce_block( fc::hours(100) ); //should close "perfa" + produce_block( fc::hours(100) ); //should close "perfb" + + //despite "perfa" account hasn't been created, we should be able to create "perfb" account + create_account_with_resources( N(prefb), N(bob111111111) ); +} FC_LOG_AND_RETHROW() + BOOST_FIXTURE_TEST_CASE( vote_producers_in_and_out, eosio_system_tester ) try { const asset net = core_from_string("80.0000"); From 613cda0b9a2633c79f41465f3af67f69b42fbdf0 Mon Sep 17 00:00:00 2001 From: arhag Date: Tue, 24 Jul 2018 18:11:29 -0400 Subject: [PATCH 3/3] typo fixes and upgrade version to 1.1.1 in CMakeLists.txt and README --- CMakeLists.txt | 2 +- README.md | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11c809ca9..4bf8cab8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -project(eosio_contracts VERSION 1.1.0) +project(eosio_contracts VERSION 1.1.1) if(CMAKE_BUILD_TYPE STREQUAL "Debug") set(TEST_BUILD_TYPE "Debug") diff --git a/README.md b/README.md index 4aebc8a61..883c887f7 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,16 @@ # eosio.contracts -## Version : 1.1.0 +## Version : 1.1.1 The design of the EOSIO blockchain calls for a number of smart contracts that are run at a privileged permission level in order to support functions such as block producer registration and voting, token staking for CPU and network bandwidth, RAM purchasing, multi-sig, etc. These smart contracts are referred to as the system, token, msig and sudo contracts. -This repository contains examples of these priviledged contracts that are useful when depoying, managing, and/or using an EOSIO blockchain. They are provided for reference purposes: +This repository contains examples of these privileged contracts that are useful when deploying, managing, and/or using an EOSIO blockchain. They are provided for reference purposes: * [eosio.system](https://github.com/eosio/eosio.contracts/tree/master/eosio.system) - * [eosio.msig](https://github.com/eosio/eosio.contracts/tree/master/eosio.msig) * [eosio.sudo](https://github.com/eosio/eosio.contracts/tree/master/eosio.sudo) - -The following unpriviledged contract(s) are also part of the system. + +The following unprivileged contract(s) are also part of the system. * [eosio.token](https://github.com/eosio/eosio.contracts/tree/master/eosio.token) Dependencies: