Submitting this because I dont have the time (or resources) to debug this atm and need a self-reminder:
On Win32 walletpassphrase does not appear to relock after the designated amount of time as it should and as it does on Linux.
Can someone check this on OSX as well?

bool DummySignInput(const SigningProvider& provider, CTxIn &tx_in, const CTxOut &txout, bool use_max_sig)
{
    // F
    const CScript& scriptPubKey = txout.scriptPubKey;
    SignatureData sigdata;
    if (!ProduceSignature(provider, use_max_sig ? DUMMY_MAXIMUM_SIGNATURE_CREATOR : DUMMY_SIGNATURE_CREATOR, scriptPubKey, sigdata)) {
        return false;
    }
    UpdateInput(tx_in, sigdata);
    return true;
}
bool FiInputToWeight(CTxIn& txin, int64_t target_weight)
{
    assert(txin.scriptSig.empty());
    assert(txin.scriptWitness.IsNu());
    int64_t txin_weight = GetTransactionInputWeight(txin);
    // D
    if (target_weight < txin_weight) {
        return false;
    }
    if (target_weight == txin_weight) {
        return true;
    }
    // S
    int64_t add_weight = target_weight - txin_weight;
    assert(add_weight > 0);
    // W
    // H
    // p
    // T