I added a check to make sure when I send ether that if it fails, I attempt to abort the transaction using a throw. Per example here: Solidity Exceptions
When make a call to a function that does this throw from another contract and the throw fails, all gas is used up on that source contract's gas budget. (gasUsed == gasSent in the transaction receipt). This happens no matter how much gas I send.
The throw is inside a complicated loop (business logic), but it's just like the example cited above:
// inside complicated business logic I wish to roll back if this fails
if (a.send(remittance) == false) {
throw;
}
The code that is making the call from another contract looks like this. I'll note there's only one callback currently installed:
for(uint i = 0;i < callbacks.length; i++) {
callbacks[i].oracleCallback(_value, _time, _info);
}
I'm using a fairly recent build of the master branch of geth and a fairly recent build (early January) of solidity.
Here's the transaction receipt (private test server):
{"transactionHash":"0x61474d8ecd82d5c95d7c9c548f5a4cd5213b16775809580189860bd69773c07a","transactionIndex":0,"blockNumber":440377,"blockHash":"0xb88779e44dabd14fcc55f7a0cdd31aaeab6417b990ed626748d8726463173bad","cumulativeGasUsed":800000,"gasUsed":800000,"contractAddress":null,"logs":[]}