Merge pull request #4468 from Munkybooty/backports-0.19-pr1

Backports 0.19 pr1
This commit is contained in:
UdjinM6 2021-10-01 20:10:29 +03:00 committed by GitHub
commit 38aeb47cc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 42 additions and 11 deletions

View File

@ -4,6 +4,10 @@
# Network-related settings:
# Note that if you use testnet or regtest, particularly with the options
# addnode, connect, port, bind, rpcport, rpcbind or wallet, you will also
# want to read "[Sections]" further down.
# Run on the test network instead of the real dash network.
#testnet=0
@ -53,6 +57,9 @@
# Listening mode, enabled by default except when 'connect' is being used
#listen=1
# Port on which to listen for connections (default: 9999, testnet: 19999, regtest: 19899)
#port=
# Maximum number of inbound+outbound connections.
#maxconnections=
@ -121,6 +128,10 @@
# Wallet options
# Specify where to find wallet, lockfile and logs. If not present, those files will be
# created as new.
#wallet=</path/to/dir>
# Create transactions that have enough fees so they are likely to begin confirmation within n blocks (default: 6).
# This setting is over-ridden by the -paytxfee option.
#txconfirmtarget=n
@ -148,3 +159,19 @@
# Minimize to the system tray
#minimizetotray=1
# [Sections]
# Most options apply to mainnet, testnet and regtest.
# If you want to confine an option to just one network, you should add it in the
# relevant section below.
# EXCEPTIONS: The options addnode, connect, port, bind, rpcport, rpcbind and wallet
# only apply to mainnet unless they appear in the appropriate section below.
# Options only for mainnet
[main]
# Options only for testnet
[test]
# Options only for regtest
[regtest]

View File

@ -1,6 +1,7 @@
---
name: "dash-linux-0.17"
enable_cache: true
distro: "ubuntu"
suites:
- "bionic"
architectures:

View File

@ -1,5 +1,6 @@
---
name: "dash-dmg-signer"
distro: "ubuntu"
suites:
- "bionic"
architectures:

View File

@ -1,6 +1,7 @@
---
name: "dash-osx-0.17"
enable_cache: true
distro: "ubuntu"
suites:
- "bionic"
architectures:

View File

@ -1,5 +1,6 @@
---
name: "dash-win-signer"
distro: "ubuntu"
suites:
- "bionic"
architectures:

View File

@ -1,6 +1,7 @@
---
name: "dash-win-0.17"
enable_cache: true
distro: "ubuntu"
suites:
- "bionic"
architectures:

View File

@ -0,0 +1,3 @@
Miscellaneous CLI Changes
-------------------------
- The `testnet` field in `dash-cli -getinfo` has been renamed to `chain` and now returns the current network name as defined in BIP70 (main, test, regtest).

View File

@ -674,6 +674,8 @@ if TARGET_WINDOWS
dashd_SOURCES += dashd-res.rc
endif
# Libraries below may be listed more than once to resolve circular dependencies (see
# https://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking#circular-dependency)
dashd_LDADD = \
$(LIBBITCOIN_SERVER) \
$(LIBBITCOIN_WALLET) \

View File

@ -270,10 +270,6 @@ public:
}
result.pushKV("version", batch[ID_NETWORKINFO]["result"]["version"]);
result.pushKV("protocolversion", batch[ID_NETWORKINFO]["result"]["protocolversion"]);
if (!batch[ID_WALLETINFO].isNull()) {
result.pushKV("walletversion", batch[ID_WALLETINFO]["result"]["walletversion"]);
result.pushKV("balance", batch[ID_WALLETINFO]["result"]["balance"]);
}
result.pushKV("blocks", batch[ID_BLOCKCHAININFO]["result"]["blocks"]);
result.pushKV("headers", batch[ID_BLOCKCHAININFO]["result"]["headers"]);
result.pushKV("verificationprogress", batch[ID_BLOCKCHAININFO]["result"]["verificationprogress"]);
@ -281,7 +277,7 @@ public:
result.pushKV("connections", batch[ID_NETWORKINFO]["result"]["connections"]);
result.pushKV("proxy", batch[ID_NETWORKINFO]["result"]["networks"][0]["proxy"]);
result.pushKV("difficulty", batch[ID_BLOCKCHAININFO]["result"]["difficulty"]);
result.pushKV("testnet", UniValue(batch[ID_BLOCKCHAININFO]["result"]["chain"].get_str() == "test"));
result.pushKV("chain", UniValue(batch[ID_BLOCKCHAININFO]["result"]["chain"]));
if (!batch[ID_WALLETINFO].isNull()) {
result.pushKV("walletversion", batch[ID_WALLETINFO]["result"]["walletversion"]);
result.pushKV("balance", batch[ID_WALLETINFO]["result"]["balance"]);

View File

@ -57,18 +57,16 @@ class TestBitcoinCli(BitcoinTestFramework):
assert_equal(cli_get_info['version'], network_info['version'])
assert_equal(cli_get_info['protocolversion'], network_info['protocolversion'])
if self.is_wallet_compiled():
assert_equal(cli_get_info['walletversion'], wallet_info['walletversion'])
assert_equal(cli_get_info['balance'], wallet_info['balance'])
assert_equal(cli_get_info['coinjoin_balance'], wallet_info['coinjoin_balance'])
assert_equal(cli_get_info['blocks'], blockchain_info['blocks'])
assert_equal(cli_get_info['timeoffset'], network_info['timeoffset'])
assert_equal(cli_get_info['connections'], network_info['connections'])
assert_equal(cli_get_info['proxy'], network_info['networks'][0]['proxy'])
assert_equal(cli_get_info['difficulty'], blockchain_info['difficulty'])
assert_equal(cli_get_info['testnet'], blockchain_info['chain'] == "test")
assert_equal(cli_get_info['chain'], blockchain_info['chain'])
if self.is_wallet_compiled():
assert_equal(cli_get_info['walletversion'], wallet_info['walletversion'])
assert_equal(cli_get_info['balance'], wallet_info['balance'])
assert_equal(cli_get_info['coinjoin_balance'], wallet_info['coinjoin_balance'])
assert_equal(cli_get_info['keypoololdest'], wallet_info['keypoololdest'])
assert_equal(cli_get_info['keypoolsize'], wallet_info['keypoolsize'])
assert_equal(cli_get_info['paytxfee'], wallet_info['paytxfee'])

View File

@ -216,7 +216,7 @@ class P2PConnection(asyncio.Protocol):
if len(self.recvbuf) < 4:
return
if self.recvbuf[:4] != MAGIC_BYTES[self.network]:
raise ValueError("got garbage %s" % repr(self.recvbuf))
raise ValueError("magic bytes mismatch: {} != {}".format(repr(self.magic_bytes), repr(self.recvbuf)))
if len(self.recvbuf) < 4 + 12 + 4 + 4:
return
command = self.recvbuf[4:4+12].split(b"\x00", 1)[0]