mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Merge pull request #16 from ethereum/master
pull latest changes from go-ethereum
This commit is contained in:
commit
3ed1bf44d5
2 changed files with 4 additions and 5 deletions
|
|
@ -85,7 +85,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
|
||||||
// and uses the input parameters for its environment. It returns the receipt
|
// and uses the input parameters for its environment. It returns the receipt
|
||||||
// for the transaction, gas used and an error if the transaction failed,
|
// for the transaction, gas used and an error if the transaction failed,
|
||||||
// indicating the block was invalid.
|
// indicating the block was invalid.
|
||||||
func ApplyTransaction(config *params.ChainConfig, bc *BlockChain, author *common.Address, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64, cfg vm.Config) (*types.Receipt, uint64, error) {
|
func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *common.Address, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, usedGas *uint64, cfg vm.Config) (*types.Receipt, uint64, error) {
|
||||||
msg, err := tx.AsMessage(types.MakeSigner(config, header.Number))
|
msg, err := tx.AsMessage(types.MakeSigner(config, header.Number))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
|
|
|
||||||
|
|
@ -53,10 +53,9 @@ func hexToCompact(hex []byte) []byte {
|
||||||
|
|
||||||
func compactToHex(compact []byte) []byte {
|
func compactToHex(compact []byte) []byte {
|
||||||
base := keybytesToHex(compact)
|
base := keybytesToHex(compact)
|
||||||
|
// delete terminator flag
|
||||||
|
if base[0] < 2 {
|
||||||
base = base[:len(base)-1]
|
base = base[:len(base)-1]
|
||||||
// apply terminator flag
|
|
||||||
if base[0] >= 2 {
|
|
||||||
base = append(base, 16)
|
|
||||||
}
|
}
|
||||||
// apply odd flag
|
// apply odd flag
|
||||||
chop := 2 - base[0]&1
|
chop := 2 - base[0]&1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue