|
| 1 | +/** |
| 2 | + * Copyright (c) 2011-2026 libbitcoin developers (see AUTHORS) |
| 3 | + * |
| 4 | + * This file is part of libbitcoin. |
| 5 | + * |
| 6 | + * This program is free software: you can redistribute it and/or modify |
| 7 | + * it under the terms of the GNU Affero General Public License as published by |
| 8 | + * the Free Software Foundation, either version 3 of the License, or |
| 9 | + * (at your option) any later version. |
| 10 | + * |
| 11 | + * This program is distributed in the hope that it will be useful, |
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | + * GNU Affero General Public License for more details. |
| 15 | + * |
| 16 | + * You should have received a copy of the GNU Affero General Public License |
| 17 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | + */ |
| 19 | +#include "../../test.hpp" |
| 20 | +#include "electrum.hpp" |
| 21 | + |
| 22 | +BOOST_FIXTURE_TEST_SUITE(electrum_tests, electrum_setup_fixture) |
| 23 | + |
| 24 | +// blockchain.relay_fee |
| 25 | + |
| 26 | +BOOST_AUTO_TEST_CASE(electrum__blockchain_relay_fee__default__expected) |
| 27 | +{ |
| 28 | + BOOST_CHECK(handshake()); |
| 29 | + |
| 30 | + constexpr auto expected = 99.0; |
| 31 | + const auto response = get(R"({"id":90,"method":"blockchain.relayfee","params":[]})" "\n"); |
| 32 | + BOOST_CHECK_EQUAL(response.at("id").as_int64(), 90); |
| 33 | + BOOST_CHECK(response.at("result").is_number()); |
| 34 | + BOOST_CHECK_EQUAL(response.at("result").as_double(), expected); |
| 35 | +} |
| 36 | + |
| 37 | +BOOST_AUTO_TEST_SUITE_END() |
0 commit comments