git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit 0a7a0a86bd0077be2dad52bd6df4d248b0ca4a6a

Kernel: simplify contract creation condition

Alex Beregszaszi committed on 8/28/2016, 9:18:55 PM
Parent: b84b9ce5c6f30045e23b1dafc1bcea2333cbd73f

Files changed

index.jschanged
index.jsView
@@ -185,14 +185,11 @@
185185
186186 let isCreation = false
187187
188188 // Special case: contract deployment
189- if (tx.to.isZero()) {
190- if (tx.data.length !== 0) {
191- console.log('This is a contract deployment transaction')
192-
193- isCreation = true
194- }
189+ if (tx.to.isZero() && (tx.data.length !== 0)) {
190+ console.log('This is a contract deployment transaction')
191+ isCreation = true
195192 }
196193
197194 // This cost will not be refunded
198195 let txCost = 21000 + (isCreation ? 32000 : 0)

Built with git-ssb-web