Contract creation address are empty again
This commit is contained in:
parent
250d40bca0
commit
0b6b6b52fe
@ -13,7 +13,8 @@ import (
|
|||||||
var ContractAddr = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
var ContractAddr = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||||
|
|
||||||
func IsContractAddr(addr []byte) bool {
|
func IsContractAddr(addr []byte) bool {
|
||||||
return bytes.Compare(addr, ContractAddr) == 0
|
return len(addr) == 0
|
||||||
|
//return bytes.Compare(addr, ContractAddr) == 0
|
||||||
}
|
}
|
||||||
|
|
||||||
type Transaction struct {
|
type Transaction struct {
|
||||||
@ -31,7 +32,7 @@ type Transaction struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewContractCreationTx(value, gas, gasPrice *big.Int, script []byte) *Transaction {
|
func NewContractCreationTx(value, gas, gasPrice *big.Int, script []byte) *Transaction {
|
||||||
return &Transaction{Recipient: ContractAddr, Value: value, Gas: gas, GasPrice: gasPrice, Data: script, contractCreation: true}
|
return &Transaction{Recipient: nil, Value: value, Gas: gas, GasPrice: gasPrice, Data: script, contractCreation: true}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewTransactionMessage(to []byte, value, gas, gasPrice *big.Int, data []byte) *Transaction {
|
func NewTransactionMessage(to []byte, value, gas, gasPrice *big.Int, data []byte) *Transaction {
|
||||||
|
@ -72,8 +72,6 @@ type TxPool struct {
|
|||||||
|
|
||||||
func NewTxPool(ethereum EthManager) *TxPool {
|
func NewTxPool(ethereum EthManager) *TxPool {
|
||||||
return &TxPool{
|
return &TxPool{
|
||||||
//server: s,
|
|
||||||
mutex: sync.Mutex{},
|
|
||||||
pool: list.New(),
|
pool: list.New(),
|
||||||
queueChan: make(chan *Transaction, txPoolQueueSize),
|
queueChan: make(chan *Transaction, txPoolQueueSize),
|
||||||
quit: make(chan bool),
|
quit: make(chan bool),
|
||||||
|
Loading…
Reference in New Issue
Block a user