aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-03-19 21:02:56 +0800
committerzelig <viktor.tron@gmail.com>2015-03-20 18:41:41 +0800
commit0578df9467bb00be967da7798cc0ea8b6e7e48d7 (patch)
tree042e9de131a565a6f0b4401728e6676fd6be794b
parenta578db5dae0ae82ac8e06be8a29c48a7db22ebe0 (diff)
downloaddexon-0578df9467bb00be967da7798cc0ea8b6e7e48d7.tar.gz
dexon-0578df9467bb00be967da7798cc0ea8b6e7e48d7.tar.zst
dexon-0578df9467bb00be967da7798cc0ea8b6e7e48d7.zip
remove eth/wallet.go (only commented out content)
-rw-r--r--eth/wallet.go80
1 files changed, 0 insertions, 80 deletions
diff --git a/eth/wallet.go b/eth/wallet.go
deleted file mode 100644
index 9ec834309..000000000
--- a/eth/wallet.go
+++ /dev/null
@@ -1,80 +0,0 @@
-package eth
-
-/*
-import (
- "crypto/ecdsa"
- "errors"
- "math/big"
-
- "github.com/ethereum/go-ethereum/core"
- "github.com/ethereum/go-ethereum/core/types"
-)
-
-type Account struct {
- w *Wallet
-}
-
-func (self *Account) Transact(to *Account, value, gas, price *big.Int, data []byte) error {
- return self.w.transact(self, to, value, gas, price, data)
-}
-
-func (self *Account) Address() []byte {
- return nil
-}
-
-func (self *Account) PrivateKey() *ecdsa.PrivateKey {
- return nil
-}
-
-type Wallet struct{}
-
-func NewWallet() *Wallet {
- return &Wallet{}
-}
-
-func (self *Wallet) GetAccount(i int) *Account {
-}
-
-func (self *Wallet) transact(from, to *Account, value, gas, price *big.Int, data []byte) error {
- if from.PrivateKey() == nil {
- return errors.New("accounts is not owned (no private key available)")
- }
-
- var createsContract bool
- if to == nil {
- createsContract = true
- }
-
- var msg *types.Transaction
- if contractCreation {
- msg = types.NewContractCreationTx(value, gas, price, data)
- } else {
- msg = types.NewTransactionMessage(to.Address(), value, gas, price, data)
- }
-
- state := self.chainManager.TransState()
- nonce := state.GetNonce(key.Address())
-
- msg.SetNonce(nonce)
- msg.SignECDSA(from.PriateKey())
-
- // Do some pre processing for our "pre" events and hooks
- block := self.chainManager.NewBlock(from.Address())
- coinbase := state.GetOrNewStateObject(from.Address())
- coinbase.SetGasPool(block.GasLimit())
- self.blockManager.ApplyTransactions(coinbase, state, block, types.Transactions{tx}, true)
-
- err := self.obj.TxPool().Add(tx)
- if err != nil {
- return nil, err
- }
- state.SetNonce(key.Address(), nonce+1)
-
- if contractCreation {
- addr := core.AddressFromMessage(tx)
- pipelogger.Infof("Contract addr %x\n", addr)
- }
-
- return tx, nil
-}
-*/