New to Ethereum. Started working with a simple sample contract. It's working correctly except for the fact that I simply cannot seem to increase its balance. Any thoughts?
contract Faucet {
address owner;
uint256 sendAmount;
function Faucet() {
owner = msg.sender;
sendAmount = 1000000000000000000;
}
function getBalance() returns (uint) {
return this.balance;
}
function getWei() returns (bool) {
return msg.sender.send(sendAmount);
}
function sendWei(address toWhom) returns (bool) {
return toWhom.send(sendAmount);
}
function getSendAmount() returns (uint256) {
return sendAmount;
}
function killMe() returns (bool) {
if (msg.sender == owner) {
suicide(owner);
return true;
}
}
}
Then, using Geth :
eth.getBalance(faucetAddress)
1000000000000000000
Next...
eth.sendTransaction({from:eth.coinbase, to:faucetAddress, amount:1000000000000000000})
Block is mined, then:
eth.getBalance(faucetAddress)
1000000000000000000
No increase.
Here's my transaction receipt. Many thanks in advance.
{
blockHash: "0x6dacad47ad5f6a4e8dbb38a70bbe77b1d2ef019df396642c0490afc7e5ad2c8c",
blockNumber: 1526,
contractAddress: null,
cumulativeGasUsed: 90000,
from: "0x245d5fef6bf170a0fc6b464f033bff2aea020dbd",
gasUsed: 90000,
logs: [],
root: "9da791d719134c34bdad70c6cfcc424a1daa1a1573a6319f475a61b7d2728b80",
to: "0xeff6f295823648420cd1e6707caf99340c2343d0",
transactionHash: "0xbc6c596afe9e05eb496d85472ade592fbb179fd7b4e0a619cba84bd8930da35b",
transactionIndex: 0
}