Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
0578df94
Commit
0578df94
authored
Mar 19, 2015
by
zelig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove eth/wallet.go (only commented out content)
parent
a578db5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
80 deletions
+0
-80
wallet.go
eth/wallet.go
+0
-80
No files found.
eth/wallet.go
deleted
100644 → 0
View file @
a578db5d
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
}
*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment