Ganache/TestRPC experiences transaction hash collisions when the only thing differentiating two transactions is the sender, for example, when two brand new accounts send identical transactions to the same contract.
Example:
I'd expect that in the below code, tx1.hash() would not be the same as tx2.hash().
var tx1 = new FakeTransaction({
data:"0x7cf5dab00000000000000000000000000000000000000000000000000000000000000005",
gasLimit:"0x15f90",
gasPrice:"0x1",
nonce:"0x01",
to:"0xd9024df085d09398ec76fbed18cac0e1149f50dc",
value:"0x0",
from: "0xf492dd75de5acfe13ef9bae89a0f51767be3dae5"
});
var tx2 = new FakeTransaction({
data:"0x7cf5dab00000000000000000000000000000000000000000000000000000000000000005",
gasLimit:"0x15f90",
gasPrice:"0x1",
nonce:"0x01",
to:"0xd9024df085d09398ec76fbed18cac0e1149f50dc",
value:"0x0",
from: "0x161b4555e40f6d42ae93591f3d9f35f6e765c6b9"
});
// fails
assert.notEqual(tx1.hash(), tx2.hash());
Ganache/TestRPC experiences transaction hash collisions when the only thing differentiating two transactions is the sender, for example, when two brand new accounts send identical transactions to the same contract.
Example:
I'd expect that in the below code,
tx1.hash()
would not be the same astx2.hash()
.