190 Commits

Author SHA1 Message Date
nathan 8c87e8d8c1 Document 2027 awards roadmap direction 2026-05-21 20:14:23 -07:00
nathan b9976d51fa Document pause save exit settings shell 2026-05-21 20:06:42 -07:00
nathan 1ef86d8f21 Document startup story sequence order 2026-05-21 15:56:07 -07:00
nathan 55bf40cf5a Document gameplay control restore hardening 2026-05-21 15:44:35 -07:00
nathan 338d0a13c4 Document Ground Zero asset and biome plan 2026-05-21 15:32:02 -07:00
nathan 7c70e8f797 Document Fab free-only asset guardrails 2026-05-21 15:21:38 -07:00
nathan 9fa62f90a0 Document Agrarian asset pipeline foundation 2026-05-21 15:17:07 -07:00
nathan b0b25693d2 Document controls and vegetation runtime fix 2026-05-21 13:44:13 -07:00
nathan e84fedbac4 Document gameplay input recovery 2026-05-21 09:57:07 -07:00
nathan 51508378a3 Document vegetation visual pass 2026-05-21 08:43:27 -07:00
nathan 30c9410493 Document terrain material visual pass 2026-05-21 08:12:39 -07:00
nathan 35203fb552 Document visual credibility priority 2026-05-21 07:58:43 -07:00
nathan bff1d8c60f Document Agrarian game repo reset audit 2026-05-21 03:08:13 -07:00
nathan 0dcb6ed797 Document completed Ubuntu Unreal build 2026-05-21 02:59:01 -07:00
nathan 858e57ac8b Document Unreal 5.7 source setup progress 2026-05-20 20:57:43 -07:00
nathan 6af196d209 Document Unreal source access blocker 2026-05-20 20:36:33 -07:00
nathan 916bb8b9d4 Document Ubuntu Unreal Gitea checkout 2026-05-20 20:27:59 -07:00
nathan b2e53454a0 Document Ubuntu Unreal build tools 2026-05-20 20:22:18 -07:00
nathan 1e1f955b0f Document Gitea game repo seed 2026-05-20 20:03:10 -07:00
nathan f591ddbdb3 Document Gitea SSH listener fix 2026-05-20 19:39:08 -07:00
nathan 90a4625b5a Document Gitea container repair 2026-05-20 19:14:21 -07:00
nathan 48e03e1aae Document unreal-engine Ubuntu VM 2026-05-20 18:50:15 -07:00
nathan 3ef205dfdb Document Fab character integration pass 2026-05-20 03:04:42 -07:00
nathan 6ea844a6d5 Record UE 5.7.4 forced rebuild check 2026-05-19 23:59:14 -07:00
nathan 012034bdd3 Record local Agrarian compile recovery 2026-05-19 23:47:51 -07:00
nathan f5a4d61f83 Document Agrarian local Windows workspace 2026-05-19 23:31:01 -07:00
nathan b193420eb5 Update investor stabilization handoff 2026-05-19 22:34:37 -07:00
nathan 49a9673a1d Update handoff for 0.1 audit 2026-05-19 16:20:51 -07:00
nathan ddd1aeb0ed Update handoff for 0.1.R completion 2026-05-19 16:00:13 -07:00
nathan 1216ca1a9f Update handoff for multiplayer learning rules 2026-05-19 15:53:48 -07:00
nathan 53fda4616b Update handoff for knowledge persistence requirements 2026-05-19 15:51:46 -07:00
nathan a3b9dcf6d7 Update handoff for learning exploit guardrails 2026-05-19 15:49:33 -07:00
nathan bc3bf72332 Update handoff for deeper question timing 2026-05-19 15:46:24 -07:00
nathan 5a1477ea6f Update handoff for elementary question bank 2026-05-19 15:45:10 -07:00
nathan 57d8b7efc6 Update handoff for subject content format 2026-05-19 15:43:26 -07:00
nathan 396664ba14 Update handoff for learning accessibility 2026-05-19 15:41:58 -07:00
nathan 97f87d2741 Update handoff for failed action feedback 2026-05-19 15:40:39 -07:00
nathan 02746d4d85 Update handoff for optional knowledge checks 2026-05-19 15:39:23 -07:00
nathan fdff3c46c2 Update handoff for contextual prompts 2026-05-19 15:37:54 -07:00
nathan cc1be9689d Update handoff for practical experience growth 2026-05-19 15:36:16 -07:00
nathan e66b75ce3b Update handoff for knowledge action effects 2026-05-19 15:34:52 -07:00
nathan 82e3799364 Update handoff for MVP skill taxonomy 2026-05-19 15:33:22 -07:00
nathan 2e080bdbce Update handoff for knowledge separation model 2026-05-19 15:31:46 -07:00
nathan f7e87d8ee8 Update handoff for 0.1.Q final build 2026-05-19 14:59:20 -07:00
nathan 4d3dc3e8b4 Update handoff for target player count gate 2026-05-19 14:15:08 -07:00
nathan 98d87fbfbe Update handoff for net cull cleanup 2026-05-19 14:12:52 -07:00
nathan 77daceed22 Update handoff for critical log soak gate 2026-05-19 14:10:36 -07:00
nathan 44bf9f59e1 Update handoff for server restart shelter gate 2026-05-19 14:08:14 -07:00
nathan c6466edd73 Update handoff for reconnect state retention gate 2026-05-19 14:06:08 -07:00
nathan d33b24cb4d Update handoff for survival pressure death gate 2026-05-19 14:03:49 -07:00
nathan f5da817541 Update handoff for full day night survival gate 2026-05-19 14:00:51 -07:00
nathan 0be7546eca Update handoff for craft shelter QA gate 2026-05-19 13:55:39 -07:00
nathan 49606584a5 Update handoff for craft fire QA gate 2026-05-19 13:53:25 -07:00
nathan 310889630e Update handoff for resource gathering QA gate 2026-05-19 13:51:32 -07:00
nathan 0884792a04 Update handoff for two client QA gate 2026-05-19 13:49:33 -07:00
nathan fa60bb64dc Update handoff for server launch QA gate 2026-05-19 13:46:54 -07:00
nathan 9833666a23 Update handoff for packaged client QA gate 2026-05-19 13:45:12 -07:00
nathan 003a4277f6 Update handoff for Linux server fallback deploy 2026-05-19 13:29:04 -07:00
nathan 79383cc6ef Update handoff for 0.1.P completion 2026-05-19 13:03:11 -07:00
nathan fb3e2f9565 Update handoff for audio volume sliders 2026-05-19 12:42:25 -07:00
nathan 2504a87f61 Update handoff for audio mix settings 2026-05-19 12:39:18 -07:00
nathan 84c60e89d0 Update handoff for frontend audio hooks 2026-05-19 12:36:16 -07:00
nathan e3706beada Update handoff for wildlife audio hooks 2026-05-19 12:33:40 -07:00
nathan 240b9a2c0e Update handoff for weather sounds 2026-05-19 12:29:57 -07:00
nathan 85d1c5149a Update handoff for fire risk QA coverage 2026-05-19 12:28:02 -07:00
nathan d2694f7387 Update handoff for active fire persistence 2026-05-19 12:26:08 -07:00
nathan d91ac14734 Update handoff for fire suppression hooks 2026-05-19 12:24:27 -07:00
nathan c11766e2eb Update handoff for fire maintenance gameplay 2026-05-19 12:21:58 -07:00
nathan a3c4e67524 Update handoff for fire spread rules 2026-05-19 12:19:46 -07:00
nathan db8676c8d0 Update handoff for structure ignition risk 2026-05-19 12:17:24 -07:00
nathan 7e5a74a83b Update handoff for vegetation ignition checks 2026-05-19 12:14:52 -07:00
nathan 82c8c0bb65 Update handoff for unattended fire risk 2026-05-19 12:11:23 -07:00
nathan 90537bf907 Update handoff for campfire audio hooks 2026-05-19 12:08:49 -07:00
nathan c712d58579 Update handoff for gathering audio hooks 2026-05-19 12:06:45 -07:00
nathan 95f86236d7 Update handoff for footstep audio placeholders 2026-05-19 12:04:39 -07:00
nathan bd41d2cae9 Update handoff for ambient biome audio 2026-05-19 12:01:58 -07:00
nathan 71fde3d8dc Update handoff for 0.1.O investor demo build 2026-05-19 11:50:27 -07:00
nathan 73989f6df8 Update handoff for investor acceptance gate 2026-05-19 11:24:43 -07:00
nathan 2c3a4e3dcb Update handoff for visual QA evidence gate 2026-05-19 11:21:38 -07:00
nathan 44e7de7b51 Update handoff for non-ray-traced default 2026-05-19 11:17:43 -07:00
nathan 2cf1900095 Update handoff for investor rendering presets 2026-05-19 11:14:31 -07:00
nathan 4687946339 Update handoff for MVP realism guardrails 2026-05-19 11:11:16 -07:00
nathan 5a42058c16 Update handoff for density sightline tuning 2026-05-19 11:08:31 -07:00
nathan a72481b702 Update handoff for water source visual pass 2026-05-19 11:02:04 -07:00
nathan 97542c55be Update handoff for Ground Zero biome dressing 2026-05-19 10:53:19 -07:00
nathan 5ff22a3fce Update handoff for readable object proxies 2026-05-19 10:42:48 -07:00
nathan 3514890cfa Update handoff for 0.1.O character proxies 2026-05-19 10:32:54 -07:00
nathan 68c8d5787c Update handoff for 0.1.O GPU visual gate 2026-05-19 10:24:10 -07:00
nathan c148c18a4d Update handoff for 0.1.O segmented flow 2026-05-19 10:20:55 -07:00
nathan a60e61eecb Update handoff for 0.1.O UMG menu flow 2026-05-19 10:15:18 -07:00
nathan a46ee6484a Update handoff for 0.1.O demo classification 2026-05-19 09:54:49 -07:00
nathan e589e128c7 Update handoff for 0.1.D Ground Zero backfill 2026-05-19 07:51:36 -07:00
nathan 66acb6c43f Document MVP menu input rebuild 2026-05-18 23:31:40 -07:00
nathan 62e7c50711 Document MVP menu credits fix 2026-05-18 22:37:24 -07:00
nathan 01a43bd077 Document 0.1.N investor demo build 2026-05-18 21:48:56 -07:00
nathan aecbceeb37 Document 0.1.N UI scaling handoff 2026-05-18 21:23:21 -07:00
nathan 040b028118 Document 0.1.N accessibility handoff 2026-05-18 21:19:30 -07:00
nathan aefc1a5bf9 Document 0.1.N debug dev menu handoff 2026-05-18 21:16:46 -07:00
nathan df25ff5645 Document 0.1.N death respawn UI handoff 2026-05-18 21:13:58 -07:00
nathan 59ee5d54ca Document 0.1.N interaction prompts handoff 2026-05-18 21:11:56 -07:00
nathan 4b8eaec50b Document 0.1.N crafting UI handoff 2026-05-18 21:10:18 -07:00
nathan a69496a400 Document 0.1.N inventory UI handoff 2026-05-18 21:08:37 -07:00
nathan 849fd49dfa Document 0.1.N HUD frame handoff 2026-05-18 21:06:51 -07:00
nathan f744d832f3 Document 0.1.N loading screen handoff 2026-05-18 21:04:54 -07:00
nathan ed99f2df82 Document 0.1.N join server handoff 2026-05-18 21:02:44 -07:00
nathan 4bc3dc6e9f Document 0.1.N character choice handoff 2026-05-18 21:00:02 -07:00
nathan 23c2bb19ad Document 0.1.N character selection handoff 2026-05-18 20:57:33 -07:00
nathan 54d5305a03 Document 0.1.N main menu placeholder handoff 2026-05-18 20:49:01 -07:00
nathan bf41651b5e Document 0.1.M build blocker handoff 2026-05-18 19:47:00 -07:00
nathan 33c0ee872c Document 0.1.M limitations handoff 2026-05-18 19:43:05 -07:00
nathan 50fec755e6 Document 0.1.M save recovery handoff 2026-05-18 19:40:44 -07:00
nathan 001b1679ea Document 0.1.M save backup handoff 2026-05-18 19:37:58 -07:00
nathan a6866fd45e Document 0.1.M tile registry handoff 2026-05-18 19:35:30 -07:00
nathan a82703653a Document 0.1.M startup load handoff 2026-05-18 19:32:49 -07:00
nathan ee4be4658f Document 0.1.M autosave handoff 2026-05-18 19:30:07 -07:00
nathan 2d8e5615b4 Document 0.1.M container schema handoff 2026-05-18 19:26:58 -07:00
nathan e6d6d2d5f6 Document 0.1.M weather persistence handoff 2026-05-18 19:24:46 -07:00
nathan 5e6a9b86db Document 0.1.M world time persistence handoff 2026-05-18 19:22:56 -07:00
nathan 28e6ffc6a9 Document 0.1.M resource persistence handoff 2026-05-18 19:21:10 -07:00
nathan 7e00a3e850 Document 0.1.M inventory persistence handoff 2026-05-18 19:19:28 -07:00
nathan 16091f5a27 Document 0.1.M care history persistence handoff 2026-05-18 19:17:29 -07:00
nathan 7f9fa6c28d Document 0.1.M player stats persistence handoff 2026-05-18 19:14:33 -07:00
nathan e4ef1cca4d Document 0.1.M player identity persistence handoff 2026-05-18 19:11:39 -07:00
nathan 4dff1ca7c7 Document play server Linux deployment 2026-05-18 18:38:46 -07:00
nathan 9eb72f52b0 Document play server deployment blocker 2026-05-18 16:24:54 -07:00
nathan edae39584d Document Agrarian play server VM 2026-05-18 16:15:52 -07:00
nathan dc3c036c50 Update handoff for 0.1.L investor package 2026-05-18 15:45:09 -07:00
nathan 95d92df921 Update handoff for 0.1.L demo metadata 2026-05-18 15:27:54 -07:00
nathan 1f690a9aca Update handoff for reconnect snapshots 2026-05-18 15:23:38 -07:00
nathan 2bd7811e47 Update handoff for latency test plan 2026-05-18 15:19:13 -07:00
nathan cb75fc358c Update handoff for network relevancy rules 2026-05-18 15:15:51 -07:00
nathan 084afa29d0 Update handoff for server travel flow 2026-05-18 15:13:01 -07:00
nathan 4ecd4dcc7d Update handoff for dedicated server bootstrap 2026-05-18 15:10:12 -07:00
nathan e409febb7f Update handoff for 0.1.K investor demo package 2026-05-18 14:35:41 -07:00
nathan 2c164ca916 Update handoff for 0.1.K demo metadata 2026-05-18 14:26:46 -07:00
nathan 2e5a686cd1 Update handoff for wildlife performance limits 2026-05-18 14:23:01 -07:00
nathan 9b3ce29227 Update handoff for wildlife spawn manager 2026-05-18 14:17:59 -07:00
nathan 1e10a3bd14 Update handoff for 0.1.J investor demo package 2026-05-18 13:53:33 -07:00
nathan fab40f026f Update handoff for 0.1.J demo metadata 2026-05-18 13:44:28 -07:00
nathan 1edb42e76f Update handoff for replicated death feedback 2026-05-18 13:39:00 -07:00
nathan 3cae8db8ee Update handoff for corpse backpack decision 2026-05-18 13:33:43 -07:00
nathan ddf048f7db Update handoff for MVP respawn rules 2026-05-18 13:28:54 -07:00
nathan 784b438464 Update handoff for death state 2026-05-18 13:23:52 -07:00
nathan 2eb55e21d0 Update handoff for treatment item 2026-05-18 13:17:45 -07:00
nathan 6dc39ddb2b Update handoff for sprain placeholder 2026-05-18 13:11:58 -07:00
nathan 37157782e3 Update handoff for bleeding placeholder 2026-05-18 13:03:13 -07:00
nathan a335974218 Update handoff for family NPC roadmap 2026-05-18 11:52:48 -07:00
nathan cc75588cb0 Update handoff for 0.1.I investor demo package 2026-05-18 11:45:36 -07:00
nathan d1639fe46d Update handoff for 0.1.I demo metadata 2026-05-18 11:36:54 -07:00
nathan 0c0c3568be Update handoff for shelter damage placeholder 2026-05-18 11:20:35 -07:00
nathan 903bad2d49 Update handoff for shelter opening scope 2026-05-18 11:13:54 -07:00
nathan 23a1058588 Update handoff for shelter roof piece 2026-05-18 11:10:49 -07:00
nathan 160beec0f4 Update handoff for shelter wall piece 2026-05-18 11:06:51 -07:00
nathan b7dc179af3 Update handoff for building ghost preview 2026-05-18 11:03:03 -07:00
nathan b4ebf6bb88 Update handoff for shelter building style 2026-05-18 10:49:25 -07:00
nathan 4a636ebf2f Update handoff for cinematic credits demo 2026-05-17 20:54:29 -07:00
nathan 4e7adb1150 Update handoff for startup credits 2026-05-17 20:03:51 -07:00
nathan 85e0721566 Update handoff for campfire weather behavior 2026-05-17 19:23:03 -07:00
nathan d4261a669b Update handoff for campfire persistence 2026-05-17 19:11:08 -07:00
nathan 0f4ad90331 Update handoff for campfire smoke placeholder 2026-05-17 19:01:54 -07:00
nathan ec427be05a Update handoff for campfire cooking placeholder 2026-05-17 18:52:22 -07:00
nathan c1d42448f8 Update handoff for campfire extinguish logic 2026-05-17 18:35:30 -07:00
nathan 036e4d890d Update handoff for crafting debug tools 2026-05-17 18:09:47 -07:00
nathan 2261fbcc40 Update handoff for crafting HUD 2026-05-17 17:59:39 -07:00
nathan 09dcc40281 Update handoff for simple container recipe 2026-05-17 17:42:58 -07:00
nathan 2a750d25f3 Update handoff for resource node persistence 2026-05-17 17:09:17 -07:00
nathan c306cbcf23 Update handoff for resource tool rules 2026-05-17 16:51:14 -07:00
nathan 71d8d0de91 Update handoff for resource respawn rules 2026-05-17 16:28:49 -07:00
nathan 5b332b35fa Update handoff for water gathering interaction 2026-05-17 16:09:42 -07:00
nathan 0ff547ee43 Update handoff for edible plant resource 2026-05-17 16:03:03 -07:00
nathan 3fa52a9cf6 Update handoff for stone resource 2026-05-17 15:52:53 -07:00
nathan eb67e00cd7 Update handoff for investor demo build 2026-05-17 14:19:51 -07:00
nathan 0279205e72 Update handoff for inventory persistence 2026-05-17 13:57:47 -07:00
nathan d3d2bec1ed Update handoff for inventory UI 2026-05-17 13:44:25 -07:00
nathan c09d143e5d Update handoff for carry capacity placeholder 2026-05-17 13:27:40 -07:00
nathan 25b1b2637d Update handoff for equipment slot decision 2026-05-17 13:08:03 -07:00
nathan f462f91acf Update handoff for item use 2026-05-17 13:01:57 -07:00
nathan 93f2ee7cfe Update handoff for stack splitting 2026-05-17 11:49:00 -07:00
nathan cbd5c9a57c Update handoff for item drop 2026-05-17 11:06:39 -07:00
nathan f94f45d8f8 Update handoff for item pickup 2026-05-17 00:56:23 -07:00
nathan 9d7cccbc63 Update handoff for inventory data model 2026-05-16 22:21:43 -07:00
nathan cea142ff6a Update Agrarian handoff for developer travel 2026-05-16 13:48:24 -07:00
nathan cbf03f89b7 Update Agrarian game handoff 2026-05-16 12:39:03 -07:00
nathan 5b23170158 Use wallet balance for default sendmany account 2026-05-08 17:44:56 -07:00
nathan 04862cf7a7 Support fee-subtracting sendmany payouts 2026-05-08 16:51:03 -07:00
nathan eb87369a49 Honor mining peer requirement in block templates 2026-05-08 10:12:25 -07:00
nathan bb5350aca5 Allow dev mainnet mining without peers 2026-05-08 10:07:43 -07:00
nathan 9318562278 Tune Linux daemon build memory settings 2026-05-08 09:20:47 -07:00
nathan 0adc90a9f1 Fix daemon build script target path 2026-05-08 08:36:36 -07:00
nathan b8e8717fe6 Restore Quark proof-of-work mining 2026-05-08 08:33:06 -07:00
8 changed files with 9809 additions and 27 deletions
+6 -1
View File
@@ -4,6 +4,7 @@ set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
JOBS="${JOBS:-1}" JOBS="${JOBS:-1}"
MODE="${MODE:-daemon}" MODE="${MODE:-daemon}"
DAEMON_TARGETS="${DAEMON_TARGETS:-agrariand agrarian-cli agrarian-tx}"
HOST="${HOST:-$("$ROOT/depends/config.guess")}" HOST="${HOST:-$("$ROOT/depends/config.guess")}"
PREFIX="$ROOT/depends/$HOST" PREFIX="$ROOT/depends/$HOST"
BASE_CONFIG="$PREFIX/share/config.site" BASE_CONFIG="$PREFIX/share/config.site"
@@ -50,7 +51,7 @@ case "$MODE" in
--disable-bench \ --disable-bench \
--disable-zmq \ --disable-zmq \
--with-miniupnpc=no \ --with-miniupnpc=no \
CXXFLAGS="${CXXFLAGS:--O0 -g0 --param ggc-min-expand=1 --param ggc-min-heapsize=32768}" CXXFLAGS="${CXXFLAGS:--O0 -g0 --param ggc-min-expand=20 --param ggc-min-heapsize=131072}"
echo "Cleaning stale target objects before compiling..." echo "Cleaning stale target objects before compiling..."
make clean make clean
@@ -65,5 +66,9 @@ case "$MODE" in
;; ;;
esac esac
if [[ "$MODE" == "daemon" ]]; then
make -C src -j"$JOBS" $DAEMON_TARGETS
else
make -j"$JOBS" make -j"$JOBS"
fi
echo "Linux $MODE build complete." echo "Linux $MODE build complete."
+9717
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -217,7 +217,7 @@ public:
convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main)); convertSeed6(vFixedSeeds, pnSeed6_main, ARRAYLEN(pnSeed6_main));
fMiningRequiresPeers = true; fMiningRequiresPeers = false;
fAllowMinDifficultyBlocks = false; fAllowMinDifficultyBlocks = false;
fDefaultConsistencyChecks = false; fDefaultConsistencyChecks = false;
fRequireStandard = true; fRequireStandard = true;
-3
View File
@@ -15,10 +15,7 @@
uint256 CBlockHeader::GetHash() const uint256 CBlockHeader::GetHash() const
{ {
if(nVersion < 4)
return HashQuark(BEGIN(nVersion), END(nNonce)); return HashQuark(BEGIN(nVersion), END(nNonce));
return Hash(BEGIN(nVersion), END(nAccumulatorCheckpoint));
} }
uint256 CBlock::BuildMerkleTree(bool* fMutated) const uint256 CBlock::BuildMerkleTree(bool* fMutated) const
+2 -1
View File
@@ -460,7 +460,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
if (strMode != "template") if (strMode != "template")
throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode"); throw JSONRPCError(RPC_INVALID_PARAMETER, "Invalid mode");
if (vNodes.empty()) if (vNodes.empty() && Params().MiningRequiresPeers())
throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Agrarian is not connected!"); throw JSONRPCError(RPC_CLIENT_NOT_CONNECTED, "Agrarian is not connected!");
if (IsInitialBlockDownload()) if (IsInitialBlockDownload())
@@ -605,6 +605,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
result.push_back(Pair("curtime", pblock->GetBlockTime())); result.push_back(Pair("curtime", pblock->GetBlockTime()));
result.push_back(Pair("bits", strprintf("%08x", pblock->nBits))); result.push_back(Pair("bits", strprintf("%08x", pblock->nBits)));
result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight + 1))); result.push_back(Pair("height", (int64_t)(pindexPrev->nHeight + 1)));
result.push_back(Pair("acc_checkpoint", pblock->nAccumulatorCheckpoint.GetHex()));
result.push_back(Pair("votes", aVotes)); result.push_back(Pair("votes", aVotes));
+35 -8
View File
@@ -914,9 +914,9 @@ UniValue sendfrom(const UniValue& params, bool fHelp)
UniValue sendmany(const UniValue& params, bool fHelp) UniValue sendmany(const UniValue& params, bool fHelp)
{ {
if (fHelp || params.size() < 2 || params.size() > 4) if (fHelp || params.size() < 2 || params.size() > 8)
throw runtime_error( throw runtime_error(
"sendmany \"fromaccount\" {\"address\":amount,...} ( minconf \"comment\" )\n" "sendmany \"fromaccount\" {\"address\":amount,...} ( minconf \"comment\" subtractfeefrom )\n"
"\nSend multiple times. Amounts are double-precision floating point numbers." + "\nSend multiple times. Amounts are double-precision floating point numbers." +
HelpRequiringPassphrase() + "\n" HelpRequiringPassphrase() + "\n"
@@ -929,6 +929,8 @@ UniValue sendmany(const UniValue& params, bool fHelp)
" }\n" " }\n"
"3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n" "3. minconf (numeric, optional, default=1) Only use the balance confirmed at least this many times.\n"
"4. \"comment\" (string, optional) A comment\n" "4. \"comment\" (string, optional) A comment\n"
"5. subtractfeefrom (array, optional) A json array with addresses that pay the fee\n"
"\nAlso accepts Dash/PIVX-style sendmany arguments where comment is argument 5 and subtractfeefrom is argument 6.\n"
"\nResult:\n" "\nResult:\n"
"\"transactionid\" (string) The transaction id for the send. Only 1 transaction is created regardless of \n" "\"transactionid\" (string) The transaction id for the send. Only 1 transaction is created regardless of \n"
@@ -952,15 +954,31 @@ UniValue sendmany(const UniValue& params, bool fHelp)
CWalletTx wtx; CWalletTx wtx;
wtx.strFromAccount = strAccount; wtx.strFromAccount = strAccount;
if (params.size() > 3 && !params[3].isNull() && !params[3].get_str().empty()) int nCommentIndex = 3;
wtx.mapValue["comment"] = params[3].get_str(); int nSubtractFeeFromIndex = 4;
if (params.size() > 3 && params[3].isBool()) {
nCommentIndex = 4;
nSubtractFeeFromIndex = 5;
}
if (params.size() > nCommentIndex && !params[nCommentIndex].isNull() && params[nCommentIndex].isStr() && !params[nCommentIndex].get_str().empty())
wtx.mapValue["comment"] = params[nCommentIndex].get_str();
set<CBitcoinAddress> setAddress; set<CBitcoinAddress> setAddress;
set<string> setSubtractFeeFromAddress;
set<int> setSubtractFeeFromOutputs;
vector<pair<CScript, CAmount> > vecSend; vector<pair<CScript, CAmount> > vecSend;
if (params.size() > nSubtractFeeFromIndex && !params[nSubtractFeeFromIndex].isNull()) {
UniValue subtractFeeFrom = params[nSubtractFeeFromIndex].get_array();
for (unsigned int idx = 0; idx < subtractFeeFrom.size(); idx++)
setSubtractFeeFromAddress.insert(subtractFeeFrom[idx].get_str());
}
CAmount totalAmount = 0; CAmount totalAmount = 0;
vector<string> keys = sendTo.getKeys(); vector<string> keys = sendTo.getKeys();
for (const string& name_ : keys) { for (unsigned int i = 0; i < keys.size(); i++) {
const string& name_ = keys[i];
CBitcoinAddress address(name_); CBitcoinAddress address(name_);
if (!address.IsValid()) if (!address.IsValid())
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Agrarian address: ")+name_); throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, string("Invalid Agrarian address: ")+name_);
@@ -974,12 +992,21 @@ UniValue sendmany(const UniValue& params, bool fHelp)
totalAmount += nAmount; totalAmount += nAmount;
vecSend.push_back(make_pair(scriptPubKey, nAmount)); vecSend.push_back(make_pair(scriptPubKey, nAmount));
if (setSubtractFeeFromAddress.count(name_))
setSubtractFeeFromOutputs.insert(i);
}
for (const string& name_ : setSubtractFeeFromAddress) {
if (!sendTo.exists(name_))
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, subtract fee from address not in send set: ")+name_);
} }
EnsureWalletIsUnlocked(); EnsureWalletIsUnlocked();
// Check funds // Check funds. Treat an empty fromaccount as whole-wallet spendable balance for
CAmount nBalance = GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE); // compatibility with modern Bitcoin-family payout callers.
CAmount nBalance = strAccount.empty() ? pwalletMain->GetBalance() : GetAccountBalance(strAccount, nMinDepth, ISMINE_SPENDABLE);
if (totalAmount > nBalance) if (totalAmount > nBalance)
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds"); throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, "Account has insufficient funds");
@@ -987,7 +1014,7 @@ UniValue sendmany(const UniValue& params, bool fHelp)
CReserveKey keyChange(pwalletMain); CReserveKey keyChange(pwalletMain);
CAmount nFeeRequired = 0; CAmount nFeeRequired = 0;
string strFailReason; string strFailReason;
bool fCreated = pwalletMain->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, strFailReason); bool fCreated = pwalletMain->CreateTransaction(vecSend, wtx, keyChange, nFeeRequired, strFailReason, NULL, ALL_COINS, false, 0, &setSubtractFeeFromOutputs);
if (!fCreated) if (!fCreated)
throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, strFailReason); throw JSONRPCError(RPC_WALLET_INSUFFICIENT_FUNDS, strFailReason);
if (!pwalletMain->CommitTransaction(wtx, keyChange)) if (!pwalletMain->CommitTransaction(wtx, keyChange))
+44 -10
View File
@@ -2094,11 +2094,13 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
const CCoinControl* coinControl, const CCoinControl* coinControl,
AvailableCoinsType coin_type, AvailableCoinsType coin_type,
bool useIX, bool useIX,
CAmount nFeePay) CAmount nFeePay,
const std::set<int>* setSubtractFeeFromOutputs)
{ {
if (useIX && nFeePay < CENT) nFeePay = CENT; if (useIX && nFeePay < CENT) nFeePay = CENT;
CAmount nValue = 0; CAmount nValue = 0;
const bool fSubtractFeeFromAmount = setSubtractFeeFromOutputs && !setSubtractFeeFromOutputs->empty();
for (const PAIRTYPE(CScript, CAmount) & s : vecSend) { for (const PAIRTYPE(CScript, CAmount) & s : vecSend) {
if (nValue < 0) { if (nValue < 0) {
@@ -2126,13 +2128,29 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
txNew.vout.clear(); txNew.vout.clear();
wtxNew.fFromMe = true; wtxNew.fFromMe = true;
CAmount nTotalValue = nValue + nFeeRet; CAmount nTotalValue = nValue + (fSubtractFeeFromAmount ? 0 : nFeeRet);
double dPriority = 0; double dPriority = 0;
// vouts to the payees // vouts to the payees
if (coinControl && !coinControl->fSplitBlock) { if (coinControl && !coinControl->fSplitBlock) {
for (const PAIRTYPE(CScript, CAmount) & s : vecSend) { for (unsigned int i = 0; i < vecSend.size(); i++) {
CTxOut txout(s.second, s.first); const PAIRTYPE(CScript, CAmount)& s = vecSend[i];
CAmount nAmount = s.second;
if(fSubtractFeeFromAmount && setSubtractFeeFromOutputs->count(i)) {
CAmount nSubtractFee = nFeeRet / setSubtractFeeFromOutputs->size();
if (i == (unsigned int)*setSubtractFeeFromOutputs->begin())
nSubtractFee += nFeeRet % setSubtractFeeFromOutputs->size();
nAmount -= nSubtractFee;
}
if (nAmount <= 0) {
strFailReason = _("The transaction amount is too small to pay the fee");
return false;
}
CTxOut txout(nAmount, s.first);
if (txout.IsDust(::minRelayTxFee)) { if (txout.IsDust(::minRelayTxFee)) {
strFailReason = _("Transaction amount too small"); strFailReason = _("Transaction amount too small");
return false; return false;
@@ -2148,13 +2166,29 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, CAmount> >& vecSend,
else else
nSplitBlock = 1; nSplitBlock = 1;
for (const PAIRTYPE(CScript, CAmount) & s : vecSend) { for (unsigned int i = 0; i < vecSend.size(); i++) {
for (int i = 0; i < nSplitBlock; i++) { const PAIRTYPE(CScript, CAmount)& s = vecSend[i];
if (i == nSplitBlock - 1) { CAmount nAmount = s.second;
uint64_t nRemainder = s.second % nSplitBlock;
txNew.vout.push_back(CTxOut((s.second / nSplitBlock) + nRemainder, s.first)); if(fSubtractFeeFromAmount && setSubtractFeeFromOutputs->count(i)) {
CAmount nSubtractFee = nFeeRet / setSubtractFeeFromOutputs->size();
if (i == (unsigned int)*setSubtractFeeFromOutputs->begin())
nSubtractFee += nFeeRet % setSubtractFeeFromOutputs->size();
nAmount -= nSubtractFee;
}
if (nAmount <= 0) {
strFailReason = _("The transaction amount is too small to pay the fee");
return false;
}
for (int j = 0; j < nSplitBlock; j++) {
if (j == nSplitBlock - 1) {
uint64_t nRemainder = nAmount % nSplitBlock;
txNew.vout.push_back(CTxOut((nAmount / nSplitBlock) + nRemainder, s.first));
} else } else
txNew.vout.push_back(CTxOut(s.second / nSplitBlock, s.first)); txNew.vout.push_back(CTxOut(nAmount / nSplitBlock, s.first));
} }
} }
} }
+2 -1
View File
@@ -500,7 +500,8 @@ public:
const CCoinControl* coinControl = NULL, const CCoinControl* coinControl = NULL,
AvailableCoinsType coin_type = ALL_COINS, AvailableCoinsType coin_type = ALL_COINS,
bool useIX = false, bool useIX = false,
CAmount nFeePay = 0); CAmount nFeePay = 0,
const std::set<int>* setSubtractFeeFromOutputs = NULL);
bool CreateTransaction(CScript scriptPubKey, const CAmount& nValue, CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl = NULL, AvailableCoinsType coin_type = ALL_COINS, bool useIX = false, CAmount nFeePay = 0); bool CreateTransaction(CScript scriptPubKey, const CAmount& nValue, CWalletTx& wtxNew, CReserveKey& reservekey, CAmount& nFeeRet, std::string& strFailReason, const CCoinControl* coinControl = NULL, AvailableCoinsType coin_type = ALL_COINS, bool useIX = false, CAmount nFeePay = 0);
bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, std::string strCommand = "tx"); bool CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey, std::string strCommand = "tx");
bool AddAccountingEntry(const CAccountingEntry&, CWalletDB & pwalletdb); bool AddAccountingEntry(const CAccountingEntry&, CWalletDB & pwalletdb);