Hey Collin,

How does the wallet decide to re-combine inputs that it earlier split in half?

OK, I dug into the debug log to find the transaction that combined many inputs and found that actually 23 inputs were being

combined into one staking event, see the relevant part below. Interesting that the total value is over the 1000 coin threshold:

CheckStake() : new proof-of-stake block found

hash: c942288626a9e212b9e782491fd61feb37910f518cb8e84403d9f4bed3cbd8db

proofhash: 00007b6c34df468ef70da12b881144d1b6a6c36ebe8e5323b553c81c41bf1895

target: 0001054033000000000000000000000000000000000000000000000000000000

CBlock(hash=c942288626a9e212b9e782491fd61feb37910f518cb8e84403d9f4bed3cbd8db, ver=1, hashPrevBlock=b5ee180a3ee8b1fd928138ac145cb8d98cac2ce39eaf456ce8f5addea900d542, hashMerkleRoot=27e9616631d1713bd889e86777318a6b767aaac49e020ba710ca1d195f6ad416, nTime=1432792100, nBits=1e086d6d, nNonce=0, vtx=2, vchBlockSig=304402202d285b22021aa5e94b2deeeba7778190a958c57e1bcc73d2fa3433bc06056a950220175b3fcd53e9bc8462c07af638f8794f6c7f655c91f104b581dac5977153525b)

Coinbase(hash=ffc78ce152, nTime=1432792100, ver=1, vin.size=1, vout.size=1, nLockTime=0)

CTxIn(COutPoint(0000000000, 4294967295), coinbase 02e145)

CTxOut(empty)

Coinstake(hash=044fc0a62f, nTime=1432792100, ver=1, vin.size=23, vout.size=2, nLockTime=0)

CTxIn(COutPoint(4404a90e6f, 2), scriptSig=3045022100b5a4a3931a0153)

CTxIn(COutPoint(1b6489ac13, 2), scriptSig=304502210094e1da3c7a7c02)

CTxIn(COutPoint(8b960d2fad, 2), scriptSig=3044022062b5af64dc0dca33)

CTxIn(COutPoint(270e618cad, 1), scriptSig=304402205b57faa1b397a971)

CTxIn(COutPoint(270e618cad, 2), scriptSig=3044022056912b2c2506534a)

CTxIn(COutPoint(aad1e729b8, 2), scriptSig=30440220327e771c09996dc4)

CTxIn(COutPoint(e23f021dbb, 1), scriptSig=3044022004a33ec90b8485ee)

CTxIn(COutPoint(e23f021dbb, 2), scriptSig=3045022100f07a01eceda782)

CTxIn(COutPoint(e257db3bea, 1), scriptSig=3045022100b7e8e4b562b5de)

CTxIn(COutPoint(4da73a41ff, 1), scriptSig=304402206577b450afcf2a94)

CTxIn(COutPoint(4b738ee171, 2), scriptSig=304402204771e02cbaa12b17)

CTxIn(COutPoint(31888d73d1, 1), scriptSig=3045022100e220a34031e894)

CTxIn(COutPoint(31888d73d1, 2), scriptSig=304402207e2cd617db349016)

CTxIn(COutPoint(972db1944e, 2), scriptSig=3045022100865f99092ca443)

CTxIn(COutPoint(c2f3be3074, 2), scriptSig=304402204b5f16e2c5bf88ae)

CTxIn(COutPoint(e5a39d41f6, 2), scriptSig=3045022100d91d839599209a)

CTxIn(COutPoint(af3243daeb, 1), scriptSig=3045022100dae9646561be1c)

CTxIn(COutPoint(af3243daeb, 2), scriptSig=3044022032432ba8774cb600)

CTxIn(COutPoint(16714a68e7, 1), scriptSig=3045022100f3763055fb9f11)

CTxIn(COutPoint(16714a68e7, 2), scriptSig=304402200ac8bb49dfb8f8e2)

CTxIn(COutPoint(43bc199157, 1), scriptSig=3045022100f1e36bce1d9647)

CTxIn(COutPoint(18b1058b91, 1), scriptSig=3044022017aa0130147355e3)

CTxIn(COutPoint(18b1058b91, 2), scriptSig=3045022100b93d20024661c8)

CTxOut(empty)

CTxOut(nValue=1157.08334162, scriptPubKey=03d2e666928bae3c75ec37de0d56bc02f772a559e20f51319b154faed043794c2d OP_CHECKSIG)

vMerkleTree: ffc78ce152 044fc0a62f 27e9616631

out 1157.08334162

AddToWallet 044fc0a62f new