I am new to Ethereum, trying to get the hang of using geth and web3js. Looked around and could not find a similar issue, would appreciate some explanation over the following.
I tried to create a transaction using web3js console:
eth.sendTransaction({from:sender, to:receiver, value:amount});
Following a silly mistake, instead of setting the receiver as an address string, I have set it to:
receiver = eth.accounts['public key string here...'];
Obviously, I do not have an account with such an index, so seems like receiver should be undefined and thus sendTransaction throw an error.
However, the transaction did initiate, and created a contract with a seemingly randomly generated address.
I realise that setting a wrong address for receiver will set the funds available to that random address only, making them unspendable. What is the meaning of a transaction to an undefined receiver. Why does it create a contract?
