Commit Graph
2475 Commits
Author SHA1 Message Date
Duke 4f4a72da8e Go back to taking both main+wallet lock in DecrementWitnesses
By taking a wallet lock first and then main later we run into
a potential deadlock :

2024-09-13 11:14:37 POTENTIAL DEADLOCK DETECTED
2024-09-13 11:14:37 Previous lock order was:
2024-09-13 11:14:37  (1) cs_wallet  wallet/wallet.cpp:985
2024-09-13 11:14:37  (2) cs_main  wallet/wallet.cpp:890
2024-09-13 11:14:37 Current lock order is:
2024-09-13 11:14:37  (2) cs_main  wallet/wallet.cpp:2845
2024-09-13 11:14:37  (1) cs_wallet  wallet/wallet.cpp:2845
2024-09-13 09:34:10 -04:00
Duke 6845fcd93a This rpc can only be used on non z2z chains 2024-09-13 04:22:28 -04:00
Duke be3641158a Only take cs_main lock in GetSaplingSpendDepth
We do not seem to need this lock for the entire DecrementNoteWitnesses function,
we need it only when calling GetSaplingSpendDepth. Also protects against
the case in the future where some code without cs_main calls GetSaplingSpendDepth.
2024-09-13 04:11:38 -04:00
Duke 7f9878cf0c Take a lock on cs_main in DecrementNoteWitnesses
Another possibly better approach would be to take a lock inside
GetSaplingSpendDepth since we want the lock to apply to as little
code as possible and it is GetSaplingSpendDepth that calls GetDepthInMainChain
which requires a cs_main lock .
2024-09-12 11:47:58 -04:00
Duke 975f22bfa0 Improve error message in z_sendmany if tx is estimated to be too large
The previous error message was incorrect, it could be too many inputs
or a combination of too many inputs and outputs and also did not report
the estimated size.
2024-03-21 11:30:54 -04:00
Duke 558f662a33 Do not apply sapling network rules to block height 0 or 1 in ScanForWalletTransactions 2024-03-21 11:17:58 -04:00
Duke 65c4c5c8de They are called Hush Arrakis Chains (HACs) now 2024-03-15 14:06:57 -04:00
onryo 58b65f9670 Update copyrights 2024-02-27 23:59:59 +01:00
Duke 07b041fd94 Do not apply overwinter/sapling consensus rules to block 0 2024-02-15 10:40:22 -05:00
Duke 9e0ac062fa Delete a lot of CC stuff #381 2024-01-30 11:23:35 -05:00
Duke bb8a3c57a4 Delete auction/faucet/heir CC rpcs #381 2024-01-30 10:48:21 -05:00
Duke 86104c4ef7 Remove oracles RPCs 2024-01-29 12:04:59 -05:00
Duke 27db254d68 Sapling and Overwinter network upgrades are always active
These NU's are always active for Hush Arrakis Chains so this code only serves
to slow down all operations by constantly being checked. So we disable them
which will speed up syncing, mining and creating transactions.
2024-01-21 16:34:53 -05:00
Duke 3a3c67e0fc Delete many things we do not want or need 2024-01-13 00:06:09 -05:00
Duke de7a5fb6d7 remove cc payments and rewards 2024-01-12 20:47:46 -05:00
Duke 657bb1e25e remove dice, channels, lotto 2024-01-11 22:30:50 -05:00
Duke 2a713aeba2 remove gateways 2024-01-11 21:39:08 -05:00
Duke a23ab58af6 Start removing unused gateway code 2024-01-07 13:20:17 -08:00
Duke 765487bb14 Remove unused code 2024-01-06 23:30:19 -08:00
Duke Leto 21530ba159 Remove unused code 2024-01-06 21:24:57 -08:00
jahway603 f5f52a7e81 ported Bitcoin PR 7229 to resolve Issue #16 2023-11-22 16:55:19 -05:00
Duke d0c3d7587e Add memoStr to RPC help of z_listunspent and z_listreceivedbyaddress 2023-11-22 09:43:47 -05:00
Duke cb62670581 Add memoStr to z_listunspent output 2023-11-20 09:40:15 -05:00
Duke e695340133 Update RPC help for z_listreceivedaddress 2023-11-15 07:54:30 -05:00
Duke 94a48329ad Return help output if no address is given to z_listreceivedaddress 2023-11-13 10:22:04 -05:00
Duke 7eb9d75b94 Support * or ANY_ZADDR in z_mergetoaddress 2023-10-30 09:31:48 -04:00
Duke f0395196ec Do not resend wallet txs during IBD, rescan or loading blocks 2023-10-29 21:45:30 -04:00
Duke b73297f1f5 More debugging when resending txs 2023-10-25 13:17:10 -04:00
Duke 4642a35f06 Stop building witnesses if abortrescan is called #331 2023-10-23 10:47:12 -04:00
Duke ae0ff73548 Stop building witnesses if shutdown requested, fixes #330 2023-10-23 09:49:50 -04:00
Duke d7cbdcab28 Always log when skipping a zaddr during z_importwallet 2023-09-18 20:44:16 -04:00
Duke 7c45e66fbe Also return start and ending height in z_getstats json 2023-09-08 08:28:14 -04:00
Duke 4aca3493e3 Even more zstats
Example data for the entire history of the current HUSH mainnet :

  ./src/hush-cli z_getstats 1 1487622
{
  "total_ztxs": 414962,
  "total_zins": 798083,
  "total_zouts": 3312131,
  "total_ztxs_10_or_more_zins": 6789,
  "total_ztxs_25_or_more_zins": 1779,
  "total_ztxs_50_or_more_zins": 688,
  "total_ztxs_100_or_more_zins": 174,
  "total_ztxs_10_or_more_zouts": 2855,
  "total_ztxs_25_or_more_zouts": 394,
  "total_ztxs_50_or_more_zouts": 314,
  "total_ztxs_100_or_more_zouts": 208,
  "avg_zins": 1.923267672702561,
  "avg_zouts": 7.981769415030774,
  "largest_zins": 517,
  "largest_zins_txid": "69f126edd5a0189fbbe84b0824eb48e16eddf180e7d5d4f34c4296d0f868ac7f",
  "largest_zouts": 210,
  "largest_zouts_txid": "2a3155f73fab9191978e77e03be8ec7167372c4549113a6eb3f8a9d343f749ba"
}
2023-09-05 11:30:27 -04:00
Duke ff7a597032 Lots of more data for z_getstats 2023-09-05 00:35:11 -04:00
Duke 7ea88bb303 Return total zins+zouts in json 2023-09-04 09:03:06 -04:00
Duke 8eaba566fd Force avg zins/zouts to be a double 2023-09-04 08:57:23 -04:00
Duke 0f4956dcd5 Initialize variables in z_getstats correctly 2023-09-04 08:50:05 -04:00
Duke 96ae2d61ca z_getstats RPC that calculates various stats about ztxs in a block range 2023-09-04 08:22:12 -04:00
Duke fc69220e78 Remove unused code 2023-06-17 21:38:39 -04:00
Duke b03c8f3108 Remove unused code 2023-06-17 21:31:05 -04:00
Duke 533356ce63 Remove more dead code related to interest 2023-04-06 13:22:20 -04:00
Duke c69a47dd61 Remove dead code relating to interest 2023-04-06 13:05:20 -04:00
Duke b4be7aa19b malloc_trim does not seem to exist on FreeBSD 2023-04-06 05:40:30 -07:00
Duke 8126e706c6 Optional OP_RETURN in z_sendmany 2023-03-24 16:20:17 -04:00
Duke bde7273c9f Remove mapRequest tracking 2023-03-14 15:54:28 -04:00
Duke 560f8e2f41 Remove unused GetRequestCount() 2023-03-14 14:44:14 -04:00
Duke e033a2e6eb Update copyrights to 2023 2023-02-09 18:06:03 -05:00
Duke 2c9bd5dd18 abortrescan 2023-02-09 17:17:00 -05:00
Duke b360a2395a Allow abortrescan to be called via RPC 2023-02-09 13:45:45 -08:00
Duke a7939139b2 Merge remote-tracking branch 'origin/abortrescan' into dev
Conflicts:
	src/wallet/wallet.cpp
2023-02-05 18:16:36 -08:00