ethereumjs / ethereumjs-tx

Project is in active development and has been moved to the EthereumJS VM monorepo.
https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/tx
Mozilla Public License 2.0
779 stars 235 forks source link

Fix #113 (signed FakeTransaction) #118

Closed ajhodges closed 6 years ago

ajhodges commented 6 years ago

Also serves as a contribution towards #114 .

This issue, discussed in #113, has a simple fix; a null check on the from setter. The bug is that if self._from is initialized to ethereumjs-util.toBuffer(null), it will contain a buffer object that represents '0'. Then if you call FakeTransaction.from, the getter will return that empty buffer object here (in getSenderAddress()):

if (this._from) {
  return this._from
}

This issue is currently preventing self-signed transactions from being submitted to ganache.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.01%) to 98.795% when pulling 1fb1b74ceb4c141e47829db62ea58ade99dd322b on ShipChain:master into 32989a34be2ea41ce2d58dcc2643cdc95f0bb694 on ethereumjs:master.

holgerd77 commented 6 years ago

Released this as v1.3.7.