diff options
author | Cayman Nava <caymannava@gmail.com> | 2014-09-10 12:35:53 +0800 |
---|---|---|
committer | Cayman Nava <caymannava@gmail.com> | 2014-09-10 12:35:53 +0800 |
commit | 8ac1b85a0b9dc9e25764aecfbb2571037965b450 (patch) | |
tree | 1acd26d6fe7b8fc9186aaba7c4451de0670105f3 /ethpipe/pipe.go | |
parent | 29499900160cc2ee88968b74035f0a5c2d4c5af6 (diff) | |
parent | 7dacd7eb7818a336b3be99aea834093cf40a1b08 (diff) | |
download | go-tangerine-8ac1b85a0b9dc9e25764aecfbb2571037965b450.tar.gz go-tangerine-8ac1b85a0b9dc9e25764aecfbb2571037965b450.tar.zst go-tangerine-8ac1b85a0b9dc9e25764aecfbb2571037965b450.zip |
Merge branch 'feature-pushtx' into develop
Diffstat (limited to 'ethpipe/pipe.go')
-rw-r--r-- | ethpipe/pipe.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index 800a71139..b7d3be041 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -149,6 +149,15 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price return tx.Hash(), nil } +func (self *Pipe) PushTx(tx *ethchain.Transaction) ([]byte, error) { + self.obj.TxPool().QueueTransaction(tx) + if tx.Recipient == nil { + logger.Infof("Contract addr %x", tx.CreationAddress()) + return tx.CreationAddress(), nil + } + return tx.Hash(), nil +} + func (self *Pipe) CompileMutan(code string) ([]byte, error) { data, err := ethutil.Compile(code, false) if err != nil { |