diff --git a/.github/workflows/build-and-test.ubuntu-debug.yml b/.github/workflows/build-and-test.ubuntu-debug.yml index 5e44e8ee8..b026557ea 100644 --- a/.github/workflows/build-and-test.ubuntu-debug.yml +++ b/.github/workflows/build-and-test.ubuntu-debug.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} services: elasticsearch8: - image: elastic/elasticsearch:8.8.1 + image: elastic/elasticsearch:8.10.2 options: >- --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --env discovery.type=single-node @@ -22,7 +22,7 @@ jobs: --env cluster.routing.allocation.disk.threshold_enabled=false --publish 9200:9200 elasticsearch7: - image: elastic/elasticsearch:7.17.10 + image: elastic/elasticsearch:7.17.13 options: >- --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --env discovery.type=single-node @@ -66,14 +66,14 @@ jobs: df -h . free mkdir -p _build - sudo mkdir -p /_build/libraries /_build/programs /_build/tests /mnt/_build - sudo chmod a+rwx /_build/libraries /_build/programs /_build/tests + sudo mkdir -p /_build/libraries /_build/programs /mnt/_build/tests + sudo chmod a+rwx /_build/libraries /_build/programs /mnt/_build/tests ln -s /_build/libraries _build/libraries ln -s /_build/programs _build/programs - ln -s /_build/tests _build/tests + ln -s /mnt/_build/tests _build/tests sudo ln -s /_build/libraries /mnt/_build/libraries sudo ln -s /_build/programs /mnt/_build/programs - sudo ln -s /_build/tests /mnt/_build/tests + sudo ln -s /mnt/_build/tests /_build/tests ls -al _build pushd _build export -n BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR diff --git a/.github/workflows/build-and-test.ubuntu-release.yml b/.github/workflows/build-and-test.ubuntu-release.yml index 5fff3893d..9fc718e85 100644 --- a/.github/workflows/build-and-test.ubuntu-release.yml +++ b/.github/workflows/build-and-test.ubuntu-release.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} services: elasticsearch8: - image: elastic/elasticsearch:8.8.1 + image: elastic/elasticsearch:8.10.2 options: >- --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --env discovery.type=single-node @@ -22,7 +22,7 @@ jobs: --env cluster.routing.allocation.disk.threshold_enabled=false --publish 9200:9200 elasticsearch7: - image: elastic/elasticsearch:7.17.10 + image: elastic/elasticsearch:7.17.13 options: >- --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --env discovery.type=single-node diff --git a/.github/workflows/build-and-test.win.yml b/.github/workflows/build-and-test.win.yml index 4151aa8ec..e2f21f64d 100644 --- a/.github/workflows/build-and-test.win.yml +++ b/.github/workflows/build-and-test.win.yml @@ -6,9 +6,9 @@ env: # The following are for windows cross-build only: BOOST_VERSION: 1_69_0 BOOST_DOTTED_VERSION: 1.69.0 - CURL_VERSION: 8.1.2 - OPENSSL_VERSION: 1.1.1u - ZLIB_VERSION: 1.2.13 + CURL_VERSION: 8.3.0 + OPENSSL_VERSION: 1.1.1w + ZLIB_VERSION: 1.3 jobs: prepare-mingw64-libs: name: Build required 3rd-party libraries diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml index 820de552d..9d2dcd2ba 100644 --- a/.github/workflows/sonar-scan.yml +++ b/.github/workflows/sonar-scan.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} services: elasticsearch8: - image: elastic/elasticsearch:8.8.1 + image: elastic/elasticsearch:8.10.2 options: >- --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --env discovery.type=single-node diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index aaa29e509..2f8a19d2f 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -69,6 +69,7 @@ Jose Marcial Vieira Bisneto Jozef Knaperek Ken Code Krzysztof Szumny +Massimo Paladin Paul Brossier Roelandp Semen Martynov @@ -80,5 +81,6 @@ bitcube hammadsherwani <83015346+hammadsherwani@users.noreply.github.com> lafona liondani +litepresence lososeg sinetek diff --git a/Doxyfile b/Doxyfile index 7f596caf9..b876a077d 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,13 +38,13 @@ PROJECT_NAME = "BitShares-Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "6.1.0" +PROJECT_NUMBER = "7.0.0" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF = "BitShares blockchain implementation and command-line interface software" +PROJECT_BRIEF = "BitShares blockchain node software and command-line wallet software" # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 diff --git a/README.md b/README.md index 6d44225ff..a5276441f 100644 --- a/README.md +++ b/README.md @@ -190,8 +190,8 @@ Use `gethelp ` to see more info about individual commands. E.G. >>> gethelp get_order_book The definition of all commands is available in the -[wallet.hpp](https://github.com/bitshares/bitshares-core/blob/master/libraries/wallet/include/graphene/wallet/wallet.hpp) souce code file. -Corresponding documentation can be found in the [Doxygen documentation](https://doxygen.bitshares.org/classgraphene_1_1wallet_1_1wallet__api.html). +[wallet.hpp](https://github.com/bitshares/bitshares-core/blob/master/libraries/wallet/include/graphene/wallet/wallet.hpp) source code file. +Corresponding documentation can be found in the [Doxygen documentation](https://bitshares.github.io/doxygen/classgraphene_1_1wallet_1_1wallet__api.html). You can run the program with `--help` parameter to see more info: @@ -211,7 +211,7 @@ Questions can be posted in [Github Discussions](https://github.com/bitshares/bit BitShares UI bugs should be reported to the [UI issue tracker](https://github.com/bitshares/bitshares-ui/issues). -Up to date online Doxygen documentation can be found at [Doxygen.BitShares.org](https://doxygen.bitshares.org/hierarchy.html). +Up to date online Doxygen documentation can be found at [https://bitshares.github.io/doxygen](https://bitshares.github.io/doxygen/hierarchy.html). Using Built-In APIs @@ -246,8 +246,8 @@ The definition of all node APIs is available in the source code files including [database_api.hpp](https://github.com/bitshares/bitshares-core/blob/master/libraries/app/include/graphene/app/database_api.hpp) and [api.hpp](https://github.com/bitshares/bitshares-core/blob/master/libraries/app/include/graphene/app/api.hpp). Corresponding documentation can be found in Doxygen: -* [database API](https://doxygen.bitshares.org/classgraphene_1_1app_1_1database__api.html) -* [other APIs](https://doxygen.bitshares.org/namespacegraphene_1_1app.html) +* [database API](https://bitshares.github.io/doxygen/classgraphene_1_1app_1_1database__api.html) +* [other APIs](https://bitshares.github.io/doxygen/namespacegraphene_1_1app.html) ### Wallet API @@ -304,7 +304,7 @@ Note: the `login` API set is always accessible. Passwords are stored in `base64` as salted `sha256` hashes. A simple Python script, [`saltpass.py`](https://github.com/bitshares/bitshares-core/blob/master/programs/witness_node/saltpass.py) -is avaliable to obtain hash and salt values from a password. +is available to obtain hash and salt values from a password. A single asterisk `"*"` may be specified as username or password hash to accept any value. With the above configuration, here is an example of how to call the `add_node` API from the `network_node` API set: @@ -320,8 +320,8 @@ The restricted API sets are accessible via HTTP too using *basic access authenti $ curl --data '{"jsonrpc": "2.0", "method": "call", "params": ["network_node", "add_node", ["127.0.0.1:9090"]], "id": 1}' http://bytemaster:supersecret@127.0.0.1:8090/ Our `doxygen` documentation contains the most up-to-date information -about APIs for the [node](https://doxygen.bitshares.org/namespacegraphene_1_1app.html) and the -[wallet](https://doxygen.bitshares.org/classgraphene_1_1wallet_1_1wallet__api.html). +about APIs for the [node](https://bitshares.github.io/doxygen/namespacegraphene_1_1app.html) and the +[wallet](https://bitshares.github.io/doxygen/classgraphene_1_1wallet_1_1wallet__api.html). FAQ diff --git a/docs b/docs index 6f6ea4ef1..8ba17318b 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit 6f6ea4ef17c72bc7d5fbdab5f98d1bea364b8723 +Subproject commit 8ba17318bdb24277906256f7bd4f56fe033fb288 diff --git a/libraries/README.md b/libraries/README.md index 06f7fc9b8..065066e68 100644 --- a/libraries/README.md +++ b/libraries/README.md @@ -1,8 +1,8 @@ # BitShares Libraries -The libraries are the core of the project and defines everything where applications can build on top. +The libraries are the core of the project and define everything where applications can build on top. -A **graphene** blockchain software will use the `app` library to define what the application will do, what services it will offer. The blockchain is defined by the `chain` library and include all the objects, types, operations, protocols that builds current consensus blockchain. The lowest level in memory database of Bitshares is developed at the `db` library. The `fc` is a helper module broadly used in the libraries code, `egenesis` will help with the genesis file, `plugins` will be loaded optionally to the application. Wallet software like the cli_wallet will benefit from the `wallet` library. +A **graphene** blockchain software will use the `app` library to define what the application will do, what services it will offer. The blockchain is defined by the `chain` library and includes all the objects, types, operations, protocols that build current consensus blockchain. The lowest level in memory database of Bitshares is developed at the `db` library. The `fc` is a helper module broadly used in the libraries code, `egenesis` will help with the genesis file, `plugins` will be loaded optionally to the application. Wallet software like the cli_wallet will benefit from the `wallet` library. Code in libraries is the most important part of **bitshares-core** project and it is maintained by the Bitshares Core Team and contributors. # Available Libraries diff --git a/libraries/app/application.cpp b/libraries/app/application.cpp index f7c340dde..b84fb0a16 100644 --- a/libraries/app/application.cpp +++ b/libraries/app/application.cpp @@ -634,7 +634,7 @@ bool application_impl::is_plugin_enabled(const string& name) const return !(_active_plugins.find(name) == _active_plugins.end()); } -/** +/* * If delegate has the item, the network has no need to fetch it. */ bool application_impl::has_item(const net::item_id& id) @@ -649,7 +649,7 @@ bool application_impl::has_item(const net::item_id& id) FC_CAPTURE_AND_RETHROW( (id) ) // GCOVR_EXCL_LINE } -/** +/* * @brief allows the application to validate an item prior to broadcasting to peers. * * @param sync_mode true if the message was fetched through the sync process, false during normal operation @@ -759,7 +759,7 @@ bool application_impl::is_included_block(const block_id_type& block_id) return block_id == block_id_in_preferred_chain; } -/** +/* * Assuming all data elements are ordered in some way, this method should * return up to limit ids that occur *after* the last ID in synopsis that * we recognize. @@ -816,7 +816,7 @@ std::vector application_impl::get_block_ids(const std::vectorget_chain_id(); } -/** +/* * Returns a synopsis of the blockchain used for syncing. This consists of a list of * block hashes at intervals exponentially increasing towards the genesis block. * When syncing to a peer, the peer uses this data to determine if we're on the same @@ -1018,7 +1018,7 @@ std::vector application_impl::get_blockchain_synopsis(const item_ha return synopsis; } FC_CAPTURE_AND_RETHROW() } // GCOVR_EXCL_LINE -/** +/* * Call this after the call to handle_message succeeds. * * @param item_type the type of the item we're synchronizing, will be the same as item passed to the sync_from() call @@ -1030,7 +1030,7 @@ void application_impl::sync_status(uint32_t item_type, uint32_t item_count) // any status reports to GUI go here } -/** +/* * Call any time the number of connected peers changes. */ void application_impl::connection_count_changed(uint32_t c) @@ -1043,7 +1043,7 @@ uint32_t application_impl::get_block_number(const item_hash_t& block_id) return block_header::num_from_id(block_id); } FC_CAPTURE_AND_RETHROW( (block_id) ) } // GCOVR_EXCL_LINE -/** +/* * Returns the time a block was produced (if block_id = 0, returns genesis time). * If we don't know about the block, returns time_point_sec::min() */ diff --git a/libraries/chain/db_market.cpp b/libraries/chain/db_market.cpp index 930de41a9..01043fcb8 100644 --- a/libraries/chain/db_market.cpp +++ b/libraries/chain/db_market.cpp @@ -1225,13 +1225,14 @@ database::match_result_type database::match_limit_settled_debt( const limit_orde wlog( "Unexpected scene: obj.for_sale > bitasset.individual_settlement_fund" ); obj.for_sale = bitasset.individual_settlement_fund; obj.sell_price = ~bitasset.get_individual_settlement_price(); - } // GCOVR_EXEL_STOP + } // GCOVR_EXCL_STOP } else { obj.for_sale = bitasset.individual_settlement_fund; obj.sell_price = ~bitasset.get_individual_settlement_price(); } + // Note: filled_amount is not updated, but it should be fine }); // Note: // After the price is updated, it is possible that the order can be matched with another order on the order @@ -1325,6 +1326,7 @@ database::match_result_type database::match_settled_debt_limit( const limit_orde obj.for_sale = bitasset.individual_settlement_fund; obj.sell_price = ~bitasset.get_individual_settlement_price(); } // GCOVR_EXCL_STOP + // Note: filled_amount is not updated, but it should be fine }); } @@ -1889,6 +1891,7 @@ bool database::fill_limit_order( const limit_order_object& order, const asset& p } modify( order, [&pays,&new_take_profit_order_id]( limit_order_object& b ) { b.for_sale -= pays.amount; + b.filled_amount += pays.amount.value; b.deferred_fee = 0; b.deferred_paid_fee.amount = 0; if( new_take_profit_order_id.valid() ) // A new take profit order is created, link it to this order diff --git a/libraries/chain/hardfork.d/CORE_1604.hf b/libraries/chain/hardfork.d/CORE_1604.hf index 078890df5..f5d73b107 100644 --- a/libraries/chain/hardfork.d/CORE_1604.hf +++ b/libraries/chain/hardfork.d/CORE_1604.hf @@ -1,5 +1,5 @@ // bitshares-core issue #1604 Operation to modify existing limit order #ifndef HARDFORK_CORE_1604_TIME -#define HARDFORK_CORE_1604_TIME (fc::time_point_sec(1893456000)) // Jan 1 00:00:00 2030 (Not yet scheduled) +#define HARDFORK_CORE_1604_TIME (fc::time_point_sec( 1700143200 )) // Thursday, November 16, 2023 14:00:00 UTC #define HARDFORK_CORE_1604_PASSED(head_block_time) (head_block_time >= HARDFORK_CORE_1604_TIME) #endif diff --git a/libraries/chain/hardfork.d/CORE_2535.hf b/libraries/chain/hardfork.d/CORE_2535.hf index 1326d21ab..b0d3dbc47 100644 --- a/libraries/chain/hardfork.d/CORE_2535.hf +++ b/libraries/chain/hardfork.d/CORE_2535.hf @@ -1,6 +1,5 @@ // bitshares-core issue #2535 Simple Order-Sends-Order (OSO) #ifndef HARDFORK_CORE_2535_TIME -// Jan 1 2030, midnight; this is a dummy date until a hardfork date is scheduled -#define HARDFORK_CORE_2535_TIME (fc::time_point_sec( 1893456000 )) +#define HARDFORK_CORE_2535_TIME (fc::time_point_sec( 1700143200 )) // Thursday, November 16, 2023 14:00:00 UTC #define HARDFORK_CORE_2535_PASSED(head_block_time) (head_block_time >= HARDFORK_CORE_2535_TIME) #endif diff --git a/libraries/chain/hardfork.d/CORE_2587.hf b/libraries/chain/hardfork.d/CORE_2587.hf index cc98fa4f2..250fd3c7e 100644 --- a/libraries/chain/hardfork.d/CORE_2587.hf +++ b/libraries/chain/hardfork.d/CORE_2587.hf @@ -1,6 +1,5 @@ // bitshares-core issue #2587 settle more than total debt in individual settlement fund when no sufficient price feeds #ifndef HARDFORK_CORE_2587_TIME -// Jan 1 2030, midnight; this is a dummy date until a hardfork date is scheduled -#define HARDFORK_CORE_2587_TIME (fc::time_point_sec( 1893456000 )) +#define HARDFORK_CORE_2587_TIME (fc::time_point_sec( 1700143200 )) // Thursday, November 16, 2023 14:00:00 UTC #define HARDFORK_CORE_2587_PASSED(head_block_time) (head_block_time >= HARDFORK_CORE_2587_TIME) #endif diff --git a/libraries/chain/hardfork.d/CORE_2591.hf b/libraries/chain/hardfork.d/CORE_2591.hf index 2dc9031d7..6fe866edb 100644 --- a/libraries/chain/hardfork.d/CORE_2591.hf +++ b/libraries/chain/hardfork.d/CORE_2591.hf @@ -1,6 +1,5 @@ // bitshares-core issue #2591 Tighter peg when collateral price rises and settlement fund or settlement order exists #ifndef HARDFORK_CORE_2591_TIME -// Jan 1 2030, midnight; this is a dummy date until a hardfork date is scheduled -#define HARDFORK_CORE_2591_TIME (fc::time_point_sec( 1893456000 )) +#define HARDFORK_CORE_2591_TIME (fc::time_point_sec( 1700143200 )) // Thursday, November 16, 2023 14:00:00 UTC #define HARDFORK_CORE_2591_PASSED(head_block_time) (head_block_time >= HARDFORK_CORE_2591_TIME) #endif diff --git a/libraries/chain/hardfork.d/CORE_2595.hf b/libraries/chain/hardfork.d/CORE_2595.hf index e5192b242..46a8ef498 100644 --- a/libraries/chain/hardfork.d/CORE_2595.hf +++ b/libraries/chain/hardfork.d/CORE_2595.hf @@ -1,6 +1,5 @@ // bitshares-core issue #2595 Credit deal auto-repayment #ifndef HARDFORK_CORE_2595_TIME -// Jan 1 2030, midnight; this is a dummy date until a hardfork date is scheduled -#define HARDFORK_CORE_2595_TIME (fc::time_point_sec( 1893456000 )) +#define HARDFORK_CORE_2595_TIME (fc::time_point_sec( 1700143200 )) // Thursday, November 16, 2023 14:00:00 UTC #define HARDFORK_CORE_2595_PASSED(head_block_time) (head_block_time >= HARDFORK_CORE_2595_TIME) #endif diff --git a/libraries/chain/hardfork.d/CORE_2604.hf b/libraries/chain/hardfork.d/CORE_2604.hf index b71dc3955..6d199ec14 100644 --- a/libraries/chain/hardfork.d/CORE_2604.hf +++ b/libraries/chain/hardfork.d/CORE_2604.hf @@ -1,6 +1,5 @@ // bitshares-core issue #2604 Allow updating liquidity pool fee rates with certain restrictions #ifndef HARDFORK_CORE_2604_TIME -// Jan 1 2030, midnight; this is a dummy date until a hardfork date is scheduled -#define HARDFORK_CORE_2604_TIME (fc::time_point_sec( 1893456000 )) +#define HARDFORK_CORE_2604_TIME (fc::time_point_sec( 1700143200 )) // Thursday, November 16, 2023 14:00:00 UTC #define HARDFORK_CORE_2604_PASSED(head_block_time) (head_block_time >= HARDFORK_CORE_2604_TIME) #endif diff --git a/libraries/chain/include/graphene/chain/asset_object.hpp b/libraries/chain/include/graphene/chain/asset_object.hpp index 60b5a0fd3..38a31daff 100644 --- a/libraries/chain/include/graphene/chain/asset_object.hpp +++ b/libraries/chain/include/graphene/chain/asset_object.hpp @@ -328,7 +328,8 @@ namespace graphene { namespace chain { ///@} /// @return true if the individual settlement pool is not empty and the bitasset's black swan response method - /// (BSRM) is @ref bitasset_options::black_swan_response_type::individual_settlement_to_fund, + /// (BSRM) is @ref + /// graphene::protocol::bitasset_options::black_swan_response_type::individual_settlement_to_fund, /// false otherwise bool is_individually_settled_to_fund()const { diff --git a/libraries/chain/include/graphene/chain/config.hpp b/libraries/chain/include/graphene/chain/config.hpp index 9ac7aa723..24bdbfa55 100644 --- a/libraries/chain/include/graphene/chain/config.hpp +++ b/libraries/chain/include/graphene/chain/config.hpp @@ -32,7 +32,7 @@ #define GRAPHENE_MAX_NESTED_OBJECTS (200) -const std::string GRAPHENE_CURRENT_DB_VERSION = "20230529"; +const std::string GRAPHENE_CURRENT_DB_VERSION = "20230906"; #define GRAPHENE_RECENTLY_MISSED_COUNT_INCREMENT 4 #define GRAPHENE_RECENTLY_MISSED_COUNT_DECREMENT 3 diff --git a/libraries/chain/include/graphene/chain/market_object.hpp b/libraries/chain/include/graphene/chain/market_object.hpp index 4faa8e5c2..b04430585 100644 --- a/libraries/chain/include/graphene/chain/market_object.hpp +++ b/libraries/chain/include/graphene/chain/market_object.hpp @@ -45,10 +45,11 @@ using namespace graphene::db; class limit_order_object : public abstract_object { public: - time_point_sec expiration; - account_id_type seller; - share_type for_sale; ///< asset id is sell_price.base.asset_id - price sell_price; + time_point_sec expiration; ///< When this limit order will expire + account_id_type seller; ///< Who is selling + share_type for_sale; ///< The amount for sale, asset id is sell_price.base.asset_id + price sell_price; ///< The seller's asking price + fc::uint128_t filled_amount = 0; ///< The amount that has been sold, asset id is sell_price.base.asset_id share_type deferred_fee; ///< fee converted to CORE asset deferred_paid_fee; ///< originally paid fee bool is_settled_debt = false; ///< Whether this order is an individual settlement fund diff --git a/libraries/chain/market_object.cpp b/libraries/chain/market_object.cpp index bc78adb1d..9f9fc5357 100644 --- a/libraries/chain/market_object.cpp +++ b/libraries/chain/market_object.cpp @@ -308,7 +308,7 @@ share_type call_order_object::get_max_debt_to_cover( price match_price, FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::limit_order_object, (graphene::db::object), - (expiration)(seller)(for_sale)(sell_price)(deferred_fee)(deferred_paid_fee) + (expiration)(seller)(for_sale)(sell_price)(filled_amount)(deferred_fee)(deferred_paid_fee) (is_settled_debt)(on_fill)(take_profit_order_id) ) diff --git a/libraries/fc b/libraries/fc index 2405393e4..33cd59ca4 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit 2405393e40219b8ff3a87ccbcc3de14e32886dda +Subproject commit 33cd59ca4950542ee048b0be9f9f52ce26a863b3 diff --git a/libraries/protocol/include/graphene/protocol/operations.hpp b/libraries/protocol/include/graphene/protocol/operations.hpp index 0540f5721..aea9903a9 100644 --- a/libraries/protocol/include/graphene/protocol/operations.hpp +++ b/libraries/protocol/include/graphene/protocol/operations.hpp @@ -133,8 +133,6 @@ namespace graphene { namespace protocol { /* 77 */ limit_order_update_operation >; - /// @} // operations group - /** * Appends required authorites to the result vector. The authorities appended are not the * same as those returned by get_required_auth diff --git a/libraries/wallet/generate_api_documentation.pl b/libraries/wallet/generate_api_documentation.pl index a51558239..fd985b247 100755 --- a/libraries/wallet/generate_api_documentation.pl +++ b/libraries/wallet/generate_api_documentation.pl @@ -16,7 +16,7 @@ #include namespace graphene { namespace wallet { - namespace detail + namespace detail { struct api_method_name_collector_visitor { @@ -29,7 +29,7 @@ } }; } - + api_documentation::api_documentation() { END @@ -110,17 +110,26 @@ sub formatDocComment for (my $i = 0; $i < @{$doc}; ++$i) { - if ($doc->[$i] eq 'params') + if (($doc->[$i] eq 'params') # doxygen version 1.8.11 (Ubuntu 16.04) or 1.8.13 (Ubuntu 18.04) + or ($doc->[$i]->{params})) # doxygen version 1.8.17 (Ubuntu 20.04) { $paramDocs .= "Parameters:\n"; - @parametersList = @{$doc->[$i + 1]}; + if ($doc->[$i] eq 'params') + { + ++$i; + @parametersList = @{$doc->[$i]}; + } + else + { + @parametersList = @{$doc->[$i]->{params}}; + } for my $parameter (@parametersList) { my $declname = $parameter->{parameters}->[0]->{name}; my $decltype = cleanupDoxygenType($paramInfo->{$declname}->{type}); - $paramDocs .= Text::Wrap::fill(' ', ' ', "$declname: " . formatDocComment($parameter->{doc}) . " (type: $decltype)") . "\n"; + $paramDocs .= Text::Wrap::fill(' ', ' ', "$declname: " . formatDocComment($parameter->{doc}) + . " (type: $decltype)") . "\n"; } - ++$i; } elsif ($doc->[$i]->{return}) { @@ -154,7 +163,7 @@ sub formatDocComment my $result = Text::Wrap::fill('', '', $bodyDocs); $result .= "\n\n" . $paramDocs if $paramDocs; $result .= "\n\n" . $returnDocs if $returnDocs; - + return $result; } diff --git a/programs/README.md b/programs/README.md index c7ddb86b4..43d9cae81 100644 --- a/programs/README.md +++ b/programs/README.md @@ -2,7 +2,7 @@ The bitshares programs are a collection of binaries to run the blockchain, interact with it or utilities. -The main program is the `witness_node`, used to run a bitshares block producer, API or plugin node. The second in importance is the `cli_wallet`, used to interact with the blockchain. This 2 programs are the most used by the community and updated by the developers, rest of the programs are utilities. +The main program is the `witness_node`, used to run a bitshares block producer, API or plugin node. The second in importance is the `cli_wallet`, used to interact with the blockchain. These 2 programs are the most used by the community and updated by the developers, rest of the programs are utilities. Programs in here are part of the **bitshares-core** project and are maintained by the bitshares core team and contributors. diff --git a/sonar-project.properties b/sonar-project.properties index 1c160ab32..67f43587b 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -3,7 +3,7 @@ sonar.organization=bitshares-on-github sonar.projectKey=bitshares_bitshares-core sonar.projectName=BitShares-Core sonar.projectDescription=BitShares Blockchain node and command-line wallet -sonar.projectVersion=7.0.x +sonar.projectVersion=8.0.x sonar.host.url=https://sonarcloud.io