Jack Grigg
7892888379
test: Improve gtest handling of `TransactionBuilderResult::GetTxOrThrow`
...
We can't directly use `EXPECT_NO_THROW` on a function that returns a
result; instead we manually call `GTEST_FAIL` if the builder result is
an error.
2022-03-29 00:26:22 +00:00
Jack Grigg
52e039ebd8
builder: Handle `std::ios_base::failure` exceptions during sighash
...
These can occur if e.g. `PrecomputedTransactionData` encounters an error
during parsing of its inputs on the Rust side.
2022-03-29 00:26:22 +00:00
Jack Grigg
8b68d73802
test: Print all logged errors to stdout during gtests
...
This makes it easier to figure out test failures caused by errors on the
Rust side, for which we generally log the error and then return a simple
failure condition (`false` or `nullptr`) which obscures the error on the
C++ side.
We add similar logic to the Boost test framework, but commented out by
default because it results in very verbose test output.
2022-03-29 00:26:22 +00:00
Kris Nuttycombe
0daa540128
Merge remote-tracking branch 'upstream/master' into nu5-consensus
2022-03-28 10:13:51 -06:00
Charlie O'Keefe
ddcfc1c5b7
Merge pull request #5757 from nuttycom/fix/ua_error_improvement
...
Improve error message for when a UA is only usable after a future NU.
2022-03-27 10:56:15 -06:00
Kris Nuttycombe
021a8d1b4b
Improve error message for when a UA is only usable after a future NU.
...
Co-authored-by: Daira Hopwood <daira@jacaranda.org>
2022-03-27 09:26:36 -06:00
Daira Hopwood
dfea6c69d2
Repair `feature_zip239` RPC test by checking the debug log of node 0 rather than its stderr.
...
Since we no longer redirect stderr, this will correctly fail if stderr has unexpected output.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-27 08:37:03 +01:00
Daira Hopwood
65d96aaa10
Switch Jack Grigg's copyright on src/rust/{include/tracing.h, src/tracing_ffi.rs} to the
...
Zcash developers (with his permission).
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-26 18:56:34 +00:00
Daira Hopwood
ac25936d0e
contrib/debian/copyright: add license for Apache-2.0.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-26 18:48:31 +00:00
Daira Hopwood
21e5fa90af
contrib/debian/copyright: add licenses of Rust dependencies that do not have Expat/MIT as an option.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-26 18:45:57 +00:00
Daira Hopwood
623f3568a7
contrib/debian/copyright: minor corrections and formatting
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-26 18:45:57 +00:00
Daira Hopwood
4d0c503ee5
contrib/debian/copyright: add license entries for Libtool macros.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-26 18:45:57 +00:00
Kris Nuttycombe
71bfbfa28e
Merge pull request #5727 from rex4539/typos
...
Fix typos
2022-03-26 08:54:10 -06:00
str4d
e87b94d88d
Merge pull request #5737 from steven-ecc/5705-remove-orchard-experimental-flag
...
Remove the fExperimentalOrchardWallet flag and related logic
2022-03-26 13:08:50 +00:00
Steven Smith
e375f4ace2
Remove the fExperimentalOrchardWallet flag and related logic
2022-03-25 21:46:09 -07:00
Kris Nuttycombe
c73f4b3fda
Merge branch 'master' into typos
2022-03-25 22:05:26 -06:00
Kris Nuttycombe
79b0490661
Merge pull request #5732 from therealyingtong/test-conflicted-orchard-notes
...
Fix handling of Orchard notes in `CWallet::GetConflicts`.
2022-03-25 22:02:55 -06:00
Kris Nuttycombe
46190bca23
Merge pull request #5751 from nuttycom/feature/fix_rpc_docs
...
Add undocumented attributes to getinfo API help text.
2022-03-25 22:01:15 -06:00
Kris Nuttycombe
74f770426b
Apply suggestions from code review
2022-03-25 18:37:31 -06:00
str4d
ffda9f1ccf
Merge pull request #5753 from superbaud/enforce-testnet-version
...
Disallow testnet peers with a protocol version older than 170040
2022-03-25 23:16:49 +00:00
str4d
696a49b30d
Merge pull request #5745 from str4d/orchard-shielded-coinbase-tests
...
Test Orchard shielded coinbase rules
2022-03-25 23:04:39 +00:00
sasha
d10c0553f3
Merge pull request #5750 from nuttycom/defensive/scanwallet_nullptr_check
...
Assert that pindexStart cannot be null in CWallet::ScanForWalletTransactions
2022-03-25 16:02:05 -07:00
Charlie O'Keefe
72d2f302f2
Merge pull request #5752 from nuttycom/test/orchard_spend_rollback
...
Add test for rollback of an Orchard spend.
2022-03-25 17:01:21 -06:00
sasha
d250b8cd88
Disallow testnet peers with a protocol version older than 170040
2022-03-25 15:02:32 -07:00
Kris Nuttycombe
ecc1e5da0c
Add missing filter to ensure only fully-transparent transactions end up in mapOrphans.
2022-03-25 15:10:44 -06:00
Kris Nuttycombe
9f4e5ef2cc
Add test for rollback of an Orchard spend.
2022-03-25 15:10:42 -06:00
Charlie O'Keefe
212f2bfb41
Merge pull request #5719 from nuttycom/cleanup/rpc_address_naming
...
Rename fields in RPC results: unifiedaddress->address and type->(pool or address_type)
2022-03-25 14:05:36 -06:00
Kris Nuttycombe
dc4afca405
Correctly return p2pkh/p2sh labels for z_listunifiedreceivers
2022-03-25 10:44:18 -06:00
Kris Nuttycombe
8630891c5a
Improve consistency of RPC parameter and result attribute naming.
...
Make consistent use of "pool", "address type" and "receiver type",
in RPC documentaion, and deprecate bare uses of "type" in RPC APIs.
Fixes #5534
Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-25 10:44:18 -06:00
Kris Nuttycombe
0b8a4e1985
Merge pull request #5714 from LarryRuane/2022-03-regtest-doc
...
Add regtest documentation to book
2022-03-25 09:59:11 -06:00
Kris Nuttycombe
1d73567f42
Add undocumented components to getinfo API.
2022-03-25 09:25:46 -06:00
Kris Nuttycombe
881e0f2ca8
Rename unifiedaddress->address in z_getaddressforaccount results
...
Fixes #5432
2022-03-25 08:29:56 -06:00
Kris Nuttycombe
b9b5d47523
Assert that pindexStart cannot be null in CWallet::ScanForWalletTransactions
2022-03-25 08:23:51 -06:00
Marshall Gaucher
4a9bd59fef
Merge pull request #5743 from daira/no-banlist-on-reindex
...
Start with an empty banlist if -reindex is set
2022-03-25 06:37:11 -07:00
ying tong
2ef41824ff
orchard_wallet_get_potential_spends: Do not use uint256 type.
...
We don't want to depend on the C++ uint256 type in the C FFI.
Co-authored-by: str4d <thestr4d@gmail.com>
2022-03-25 12:07:46 +08:00
therealyingtong
637592ebd5
Introduce OrchardWallet::GetPotentialSpendsFromNullifier method.
2022-03-25 10:41:05 +08:00
therealyingtong
7b51afd840
Fix GetConflictedOrchardNotes test.
2022-03-25 10:38:30 +08:00
Taylor Hornby
829d8d804d
Only send exceptions to the log, not stderr
2022-03-24 20:32:17 -06:00
Jack Grigg
def5a0be38
Test Orchard shielded coinbase rules
...
Also fixes a bug in `z_sendmany` transaction size estimation (we were
using the wrong size of a `CompactSize`).
2022-03-25 02:12:42 +00:00
Kris Nuttycombe
56f7bce865
Merge pull request #5742 from nuttycom/fix/sapling_ivk_load
...
Restore legacy default Sapling addresses to the keystore.
2022-03-24 20:00:04 -06:00
Daira Hopwood
50d4be17cf
Start with an empty banlist if -reindex is set. fixes #5739
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-25 01:07:44 +00:00
Kris Nuttycombe
dd578cb290
Restore legacy default Sapling addresses to the keystore.
...
Prior to zcash/zcash@90e59c3be0 Sapling
default payment addresses were added to the in-memory keystore whenever
a full viewing key was added, or loaded from disk. After that change,
the Sapling address was no longer being restored to the in-memory
keystore on wallet load; instead, z_getnewaddress and
z_getnewaddressforaccount both persist the address to the keystore
directly. This commit adds handling to `LoadCaches` to correctly persist
the default address to the wallet database, and add it to the in-memory
keystore, when this condition is detected.
2022-03-24 17:02:43 -06:00
Daira Hopwood
d17c981013
Merge pull request #5738 from daira/wallet-backup-warning
...
zcashd-wallet-tool: warn that wallet.dat still needs to be backed up, and add man page
2022-03-24 20:29:25 +00:00
Daira Hopwood
71e48e10f3
zcashd-wallet-tool: adjust man page to correct copyright information.
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-24 18:41:41 +00:00
Jack Grigg
639e97ed4a
Merge branch 'master' into nu5-consensus
2022-03-24 18:09:17 +00:00
Daira Hopwood
6b836ce7e5
zcashd-wallet-tool: warn that wallet.dat needs to be backed up. fixes #5704
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-24 14:24:43 +00:00
Daira Hopwood
e8fc2e60b4
zcashd-wallet-tool: add man page generation. fixes #5729
...
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2022-03-24 14:15:01 +00:00
therealyingtong
bd6a34b0ea
test_wallet: Test GetConflictedOrchardNotes.
2022-03-24 18:52:30 +08:00
Steven
b12eb567cb
Merge pull request #5734 from superbaud/fix-segfault-5712
...
Prevent a pindex == NULL case in the ScanForWalletTransactions traversal
2022-03-23 16:30:03 -07:00
str4d
96001afc0d
Merge pull request #5731 from str4d/unify-nu5-consensus-changes
...
Unify NU5 consensus changes with 4.7.0-rc1
2022-03-23 22:39:16 +00:00