BeamMW / beam

Beam: Scalable Confidential Cryptocurrency. Leading the way to Confidential DeFi
https://beam.mw
Apache License 2.0
699 stars 202 forks source link

Correct 4 typos in `README.md` and `core/fly_client.cpp` #1942

Closed Benjamin-Loison closed 11 months ago

Benjamin-Loison commented 1 year ago

Note that not a single new line convention seems to be applied in some files, for instance in vim node/unittests/node_test.cpp is displayed as:

    void PrepareTreasury()
    {
        Key::IKdf::Ptr pKdf;
        ECC::SetRandom(pKdf);

        PeerID pid;^M
        ECC::Scalar::Native sk;^M
        Treasury::get_ID(*pKdf, pid, sk);^M
^M
        Treasury tres;^M
        Treasury::Parameters pars;^M
        pars.m_Bursts = 1;^M
        Treasury::Entry* pE = tres.CreatePlan(pid, Rules::get().Emission.Value0 / 5, pars);^M
^M
        pE->m_pResponse.reset(new Treasury::Response);^M
        uint64_t nIndex = 1;^M
        verify_test(pE->m_pResponse->Create(pE->m_Request, *pKdf, nIndex));^M
^M
        Treasury::Data data;^M
        data.m_sCustomMsg = "test treasury";^M
        tres.Build(data);^M
^M
        beam::Serializer ser;^M
        ser & data;^M
^M
        ser.swap_buf(g_Treasury);^M
^M
        ECC::Hash::Processor() << Blob(g_Treasury) >> Rules::get().TreasuryChecksum;^M
    }
jonathancross commented 1 year ago

Sadly, it doesn't seem this project is paying attention to GitHub PRs anymore.

anatolse commented 11 months ago

Sorry guys. @jonathancross, you are right, but I will try to fix the situation:) @Benjamin-Loison, could you update your repo and resolve the conflict? And I will merge your PR

Benjamin-Loison commented 11 months ago

@anatolse what's your opinion concerning the line convention issue I mentioned? Should I open an issue or apply dos2unix or unix2dos to all files of this repository in another pull request?

anatolse commented 11 months ago

@anatolse what's your opinion concerning the line convention issue I mentioned? Should I open an issue or apply dos2unix or unix2dos to all files of this repository in another pull request?

as I know, we use unix line endings by default. I would make a separate PR for this

Benjamin-Loison commented 11 months ago

Sorry guys. @jonathancross, you are right, but I will try to fix the situation:) @Benjamin-Loison, could you update your repo and resolve the conflict? And I will merge your PR

PR updated and conflict resolved.

Concerning the line endings, I don't dare opening an issue changing the files as follows by running:

find -type f -exec dos2unix {} \;
 .gitignore                                                                |   226 +-
 .gitmodules                                                               |    24 +-
 3rdparty/crypto/blake/CMakeLists.txt                                      |    16 +-
 3rdparty/libbitcoin/CMakeLists.txt                                        |   148 +-
 3rdparty/libbitcoin/examples/CMakeLists.txt                               |   186 +-
 3rdparty/libbitcoin/examples/atomic_swap.cpp                              |  1232 ++---
 3rdparty/libbitcoin/examples/ethereum_example.cpp                         |   438 +-
 3rdparty/libbitcoin/examples/sign_tx.cpp                                  |    24 +-
 3rdparty/libbitcoin/include/bitcoin/bitcoin.hpp                           |     2 +-
 3rdparty/libbitcoin/include/bitcoin/bitcoin/unicode/console_streambuf.hpp |     2 +-
 3rdparty/libbitcoin/include/bitcoin/bitcoin/unicode/ifstream.hpp          |     2 +-
 3rdparty/libbitcoin/include/bitcoin/bitcoin/unicode/ofstream.hpp          |     2 +-
 3rdparty/libbitcoin/include/bitcoin/bitcoin/unicode/unicode.hpp           |    12 +-
 3rdparty/libbitcoin/include/bitcoin/bitcoin/unicode/unicode_istream.hpp   |     2 +-
 3rdparty/libbitcoin/include/bitcoin/bitcoin/unicode/unicode_ostream.hpp   |     2 +-
 3rdparty/libbitcoin/include/bitcoin/bitcoin/unicode/unicode_streambuf.hpp |     2 +-
 3rdparty/libbitcoin/src/CMakeLists.txt                                    |    18 +-
 3rdparty/libbitcoin/src/error.cpp                                         |     8 +-
 3rdparty/libbitcoin/src/formats/CMakeLists.txt                            |    14 +-
 3rdparty/libbitcoin/src/log/CMakeLists.txt                                |    12 +-
 3rdparty/libbitcoin/src/math/CMakeLists.txt                               |    52 +-
 3rdparty/libbitcoin/src/message/CMakeLists.txt                            |    42 +-
 3rdparty/libbitcoin/src/unicode/CMakeLists.txt                            |    50 +-
 3rdparty/libbitcoin/src/unicode/unicode.cpp                               |    16 +-
 3rdparty/libbitcoin/src/utility/CMakeLists.txt                            |    46 +-
 3rdparty/opencl-miner/clHeaders/CL/cl.hpp                                 | 15398 +++++++++++++++++++++++++++----------------------------
 3rdparty/sqlite/CMakeLists.txt                                            |    10 +-
 android/README.md                                                         |    44 +-
 android/WalletJNI.java                                                    |   196 +-
 android/com/mw/beam/beamwallet/core/Api.java                              |    72 +-
 android/com/mw/beam/beamwallet/core/entities/Wallet.java                  |   134 +-
 android/com/mw/beam/beamwallet/core/entities/dto/PaymentInfoDTO.java      |    52 +-
 android/com/mw/beam/beamwallet/core/entities/dto/SystemStateDTO.java      |    42 +-
 android/com/mw/beam/beamwallet/core/entities/dto/TxDescriptionDTO.java    |    96 +-
 android/com/mw/beam/beamwallet/core/entities/dto/UtxoDTO.java             |    60 +-
 android/com/mw/beam/beamwallet/core/entities/dto/WalletAddressDTO.java    |    74 +-
 android/com/mw/beam/beamwallet/core/entities/dto/WalletStatusDTO.java     |    66 +-
 android/com/mw/beam/beamwallet/core/listeners/WalletListener.java         |   666 +--
 android/common.cpp                                                        |   134 +-
 android/common.h                                                          |   362 +-
 android/jni.cpp                                                           |  2552 ++++-----
 android/wallet_model.cpp                                                  |  2210 ++++----
 beam/beam-node.cfg                                                        |    98 +-
 bvm/ethash_service/get_proof.js                                           |    70 +-
 bvm/sid_generator/sid_generator.cpp                                       |   128 +-
 core/chainwork.cpp                                                        |     2 +-
 core/ecc_native.h                                                         |  1996 +++----
 core/navigator.cpp                                                        |   692 +--
 core/navigator.h                                                          |   250 +-
 core/proto.h                                                              |  1800 +++----
 core/radixtree.cpp                                                        |  1730 +++----
 core/radixtree.h                                                          |   738 +--
 core/serialization_adapters.h                                             |  4476 ++++++++--------
 core/unittest/ecc_test.cpp                                                |  6258 +++++++++++-----------
 core/unittest/storage_test.cpp                                            |  1362 ++---
 explorer/CMakeLists.txt                                                   |    68 +-
 explorer/explorer-node.cfg                                                |    46 +-
 mnemonic/mnemonic.h                                                       |    78 +-
 node/functionaltests/check_mined_test.cpp                                 |   238 +-
 node/functionaltests/double_spending_2_tx_test.cpp                        |   296 +-
 node/functionaltests/double_spending_test.cpp                             |   250 +-
 node/functionaltests/experiment_with_sieze_tx_test.cpp                    |   112 +-
 node/functionaltests/send_broken_new_tx_test.cpp                          |   130 +-
 node/functionaltests/send_data_missing_test.cpp                           |   118 +-
 node/functionaltests/send_empty_kernels_test.cpp                          |   312 +-
 node/functionaltests/send_gethdr_test.cpp                                 |   222 +-
 node/functionaltests/send_getmined_test.cpp                               |   230 +-
 node/functionaltests/send_getproofutxo_test.cpp                           |   148 +-
 node/functionaltests/send_peer_info_test.cpp                              |   168 +-
 node/functionaltests/send_tx_with_equal_commitment_test.cpp               |   250 +-
 node/functionaltests/send_tx_with_unsorted_test.cpp                       |   246 +-
 node/functionaltests/send_tx_with_zero_output_test.cpp                    |   250 +-
 node/functionaltests/send_wrong_newtip_test.cpp                           |   190 +-
 node/functionaltests/send_wrong_tx_test.cpp                               |   938 ++--
 node/functionaltests/spam_havetransactions_test.cpp                       |   214 +-
 node/functionaltests/spam_transactions_test.cpp                           |   216 +-
 node/functionaltests/spend_fee_test.cpp                                   |   372 +-
 node/functionaltests/spend_mined_coins_test.cpp                           |   284 +-
 node/functionaltests/tools/base_node_connection.h                         |   118 +-
 node/functionaltests/tools/coins_checker.cpp                              |   250 +-
 node/functionaltests/tools/coins_checker.h                                |    94 +-
 node/functionaltests/tools/new_tx_tests.cpp                               |    88 +-
 node/functionaltests/tools/new_tx_tests.h                                 |    56 +-
 node/functionaltests/tools/tx_generator.cpp                               |   262 +-
 node/functionaltests/try_spend_unknown_and_known_coins_test.cpp           |   254 +-
 node/functionaltests/try_spend_unknown_coins_test.cpp                     |   250 +-
 node/processor.h                                                          |   282 +-
 node/unittests/node_test.cpp                                              |  1360 ++---
 p2p/msg_reader.h                                                          |   164 +-
 p2p/protocol_base.h                                                       |   460 +-
 pow/beamHash.cpp                                                          |   230 +-
 pow/bin2h.cmake                                                           |   148 +-
 pow/opencl_pow.cpp                                                        |    98 +-
 pow/unittests/equihash_test.cpp                                           |   238 +-
 utility/config.cpp                                                        |   314 +-
 utility/config.h                                                          |   242 +-
 utility/expected.h                                                        |    40 +-
 utility/helpers.h                                                         |     6 +-
 utility/hex.cpp                                                           |   180 +-
 utility/hex.h                                                             |    64 +-
 utility/io/libuv.h                                                        |    40 +-
 utility/io/mempool.h                                                      |   128 +-
 utility/logger_checkpoints.cpp                                            |   190 +-
 utility/serialize.h                                                       |   468 +-
 utility/serialize_fwd.h                                                   |    76 +-
 utility/serialize_streams.h                                               |   254 +-
 utility/shared_data.h                                                     |   290 +-
 utility/test_helpers.h                                                    |   170 +-
 utility/thread.h                                                          |   560 +-
 utility/unittest/address_test.cpp                                         |   122 +-
 utility/unittest/config_test.cpp                                          |   206 +-
 utility/unittest/reactor_test.cpp                                         |   132 +-
 utility/unittest/serialization_adapters_test.cpp                          |    88 +-
 utility/unittest/serialize_test.cpp                                       |   274 +-
 utility/unittest/shared_data_test.cpp                                     |   228 +-
 utility/unittest/tcpclient_test.cpp                                       |    12 +-
 version.h.in                                                              |    22 +-
 wallet/api/i_wallet_api.cpp                                               |    14 +-
 wallet/api/wallet-api.cfg                                                 |    88 +-
 wallet/cli/beam-wallet.cfg                                                |    64 +-
 wallet/cli/swaps.h                                                        |     2 +-
 wallet/core/base58.cpp                                                    |   222 +-
 wallet/core/base58.h                                                      |    48 +-
 wallet/core/base_transaction.cpp                                          |  1490 +++---
 wallet/core/base_tx_builder.cpp                                           |  2804 +++++-----
 wallet/core/base_tx_builder.h                                             |   530 +-
 wallet/laser/channel.cpp                                                  |  1320 ++---
 wallet/transactions/swaps/bridges/bitcoin/bitcoin_alice.cfg               |    24 +-
 wallet/transactions/swaps/bridges/bitcoin/bitcoin_bob.cfg                 |    18 +-
 wallet/transactions/swaps/bridges/bitcoin/bitcoin_core_016.cpp            |   146 +-
 wallet/transactions/swaps/bridges/bitcoin/bitcoin_core_016.h              |     2 +-
 wallet/transactions/swaps/bridges/bitcoin/bitcoin_core_017.h              |     2 +-
 wallet/transactions/swaps/bridges/bitcoin/bitcoin_side.cpp                |  2290 ++++-----
 wallet/transactions/swaps/bridges/bitcoin/bitcoin_side.h                  |   208 +-
 wallet/transactions/swaps/bridges/bitcoin/bridge.h                        |     2 +-
 wallet/transactions/swaps/bridges/bitcoin/common.cpp                      |    14 +-
 wallet/transactions/swaps/bridges/bitcoin/common.h                        |     2 +-
 wallet/transactions/swaps/bridges/bitcoin/electrum.cpp                    |  1982 +++----
 wallet/transactions/swaps/bridges/bitcoin_cash/common.cpp                 |     2 +-
 wallet/transactions/swaps/bridges/bitcoin_cash/common.h                   |     2 +-
 wallet/transactions/swaps/bridges/bitcoin_cash/settings.h                 |     8 +-
 wallet/transactions/swaps/bridges/dash/common.cpp                         |     6 +-
 wallet/transactions/swaps/bridges/dash/common.h                           |     2 +-
 wallet/transactions/swaps/bridges/dash/dash_side.h                        |    26 +-
 wallet/transactions/swaps/bridges/dash/settings.h                         |    14 +-
 wallet/transactions/swaps/bridges/dogecoin/common.cpp                     |     6 +-
 wallet/transactions/swaps/bridges/dogecoin/common.h                       |     2 +-
 wallet/transactions/swaps/bridges/dogecoin/dogecoin_side.h                |    26 +-
 wallet/transactions/swaps/bridges/dogecoin/settings.h                     |    16 +-
 wallet/transactions/swaps/bridges/ethereum/bridge.h                       |     2 +-
 wallet/transactions/swaps/bridges/ethereum/client.cpp                     |    48 +-
 wallet/transactions/swaps/bridges/ethereum/client.h                       |     4 +-
 wallet/transactions/swaps/bridges/ethereum/common.cpp                     |   132 +-
 wallet/transactions/swaps/bridges/ethereum/settings.cpp                   |    50 +-
 wallet/transactions/swaps/bridges/ethereum/settings.h                     |    78 +-
 wallet/transactions/swaps/bridges/litecoin/common.cpp                     |     6 +-
 wallet/transactions/swaps/bridges/litecoin/common.h                       |     2 +-
 wallet/transactions/swaps/bridges/litecoin/litecoin_alice.cfg             |    24 +-
 wallet/transactions/swaps/bridges/litecoin/litecoin_bob.cfg               |    18 +-
 wallet/transactions/swaps/bridges/litecoin/settings.h                     |    12 +-
 wallet/transactions/swaps/bridges/qtum/common.cpp                         |     8 +-
 wallet/transactions/swaps/bridges/qtum/common.h                           |     8 +-
 wallet/transactions/swaps/bridges/qtum/settings.h                         |    16 +-
 wallet/transactions/swaps/lock_tx_builder.cpp                             |   330 +-
 wallet/transactions/swaps/second_side.h                                   |    30 +-
 wallet/transactions/swaps/shared_tx_builder.cpp                           |   340 +-
 wallet/unittests/api_client/test_accept_swap_btc.js                       |    64 +-
 wallet/unittests/api_client/test_accept_swap_ltc.js                       |    64 +-
 wallet/unittests/api_client/test_addr_list.js                             |    64 +-
 wallet/unittests/api_client/test_create_address.js                        |    52 +-
 wallet/unittests/api_client/test_delete_address.js                        |    64 +-
 wallet/unittests/api_client/test_edit_address.js                          |    64 +-
 wallet/unittests/api_client/test_get_utxo.js                              |    64 +-
 wallet/unittests/api_client/test_init_bitcoin_alice.js                    |    62 +-
 wallet/unittests/api_client/test_init_bitcoin_bob.js                      |    62 +-
 wallet/unittests/api_client/test_init_litecoin_alice.js                   |    62 +-
 wallet/unittests/api_client/test_init_litecoin_bob.js                     |    62 +-
 wallet/unittests/api_client/test_list.js                                  |    84 +-
 wallet/unittests/api_client/test_send.js                                  |    60 +-
 wallet/unittests/api_client/test_split.js                                 |    58 +-
 wallet/unittests/api_client/test_start_swap_btc.js                        |    68 +-
 wallet/unittests/api_client/test_start_swap_ltc.js                        |    68 +-
 wallet/unittests/api_client/test_status.js                                |    58 +-
 wallet/unittests/bitcoin_rpc_environment.cpp                              |   508 +-
 wallet/unittests/bitcoin_rpc_test.cpp                                     |   630 +--
 wallet/unittests/electrum_test.cpp                                        |   864 ++--
 wallet/unittests/ethereum_test.cpp                                        |  1528 +++---
 wallet/unittests/lelantus_test.cpp                                        |  3284 ++++++------
 wallet/unittests/shaders/test_contract.cpp                                |    56 +-
 wallet/unittests/shaders/test_contract.h                                  |    32 +-
 wallet/unittests/swap_test.cpp                                            |  4276 +++++++--------
 wallet/unittests/swap_test_environment.cpp                                |   664 +--
 wallet/unittests/test_helpers.h                                           |    94 +-
 wallet/unittests/wallet_api_test.cpp                                      |  4786 ++++++++---------
 wallet/unittests/wallet_db_test.cpp                                       |  3448 ++++++-------
 wallet/unittests/wallet_test_environment.cpp                              |  2854 +++++------
 wallet/unittests/wallet_test_node.cpp                                     |   278 +-
 wallet/unittests/wallet_test_node.h                                       |   110 +-
 websocket/unittests/websocket_test.cpp                                    |  1230 ++---
 websocket/websocket_server.cpp                                            |   396 +-
 websocket/websocket_server.h                                              |   146 +-
 201 files changed, 48467 insertions(+), 48467 deletions(-)

Let me know if I should dare.