0.1 btc sent to 2NAjrXTdtt2f8YhX8LGa73uxHEEj3pCVkzC, now send 0.0999 from it
bitcoind only be able to find the first outpout 0.0991 amount, the second input of 0.1 is missing, so when you send 0.0999 you will get an error, bicoind think you only have 0.0991
in main.cpp if (nValueIn < GetValueOut(tx)) return state.DoS(100, error("CheckInputs() : %s value in %lld < value %lld out", tx.GetHash().ToString().c_str(),nValueIn,GetValueOut(tx)));
ERROR: CheckInputs() : 53c3e82d8b6598f6b148d3f3ac68187fae33fc0306d8662bb2f68886e63ab0cc value in 9910000 < value 9990000 out ERROR: AcceptToMemoryPool: : ConnectInputs failed 53c3e82d8b6598f6b148d3f3ac68187fae33fc0306d8662bb2f68886e63ab0cc
the solution will be foreach all outputs for (unsigned int i = 0; i < tx.vin.size(); i++) { for (unsigned int i = 0; i < tx.vout.size(); i++){ nValueIn += coins.vout[i].nValue; //nValueIn += coins.vout[prevout.n].nValue; } }