diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-27 18:44:16 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-27 18:44:16 +0800 |
commit | 272d58662c885ab1cef8930e96fb832ae5377d96 (patch) | |
tree | e040eaec5c7e895dd6aaadedbbe30054aaa5e805 /ethchain/transaction.go | |
parent | 6623500c6b2e5fe9fa41a1ce75269955af6026e8 (diff) | |
download | dexon-272d58662c885ab1cef8930e96fb832ae5377d96.tar.gz dexon-272d58662c885ab1cef8930e96fb832ae5377d96.tar.zst dexon-272d58662c885ab1cef8930e96fb832ae5377d96.zip |
Implemented LOG. Closes #159
Diffstat (limited to 'ethchain/transaction.go')
-rw-r--r-- | ethchain/transaction.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ethchain/transaction.go b/ethchain/transaction.go index c78c27ed6..b0743097d 100644 --- a/ethchain/transaction.go +++ b/ethchain/transaction.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/ethcrypto" "github.com/ethereum/go-ethereum/ethstate" "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/vm" "github.com/obscuren/secp256k1-go" ) @@ -28,6 +29,8 @@ type Transaction struct { v byte r, s []byte + logs []vm.Log + // Indicates whether this tx is a contract creation transaction contractCreation bool } @@ -54,6 +57,10 @@ func NewTransactionFromValue(val *ethutil.Value) *Transaction { return tx } +func (self *Transaction) addLog(log vm.Log) { + self.logs = append(self.logs, log) +} + func (self *Transaction) GasValue() *big.Int { return new(big.Int).Mul(self.Gas, self.GasPrice) } |