Skip to content

Commit

Permalink
Merge pull request #246 from CortexFoundation/dev
Browse files Browse the repository at this point in the history
Dev to master
  • Loading branch information
ucwong authored Nov 23, 2019
2 parents 2b7efa3 + 256d2b4 commit a208a48
Show file tree
Hide file tree
Showing 70 changed files with 17,403 additions and 11,030 deletions.
2 changes: 1 addition & 1 deletion core/asm/asm.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func HasInferOp(script []byte) bool {
// fmt.Println("loops end")
}
//if err := it.Error(); err != nil {
// fmt.Println("......")
// fmt.Println("......")
// return false
//}
// fmt.Println("END")
Expand Down
6 changes: 5 additions & 1 deletion core/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"io"
"math/big"
mrand "math/rand"
"sort"
"sync"
"sync/atomic"
"time"
Expand Down Expand Up @@ -819,7 +820,10 @@ func (bc *BlockChain) procFutureBlocks() {
}
}
if len(blocks) > 0 {
types.BlockBy(types.Number).Sort(blocks)
//types.BlockBy(types.Number).Sort(blocks)
sort.Slice(blocks, func(i, j int) bool {
return blocks[i].NumberU64() < blocks[j].NumberU64()
})

// Insert one by one as chain insertion needs contiguous ancestry between blocks
for i := range blocks {
Expand Down
4 changes: 2 additions & 2 deletions core/chain_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ type ChainIndexerChain interface {
// after an entire section has been finished or in case of rollbacks that might
// affect already finished sections.
type ChainIndexer struct {
chainDb ctxcdb.Database // Chain database to index the data from
indexDb ctxcdb.Database // Prefixed table-view of the db to write index metadata into
chainDb ctxcdb.Database // Chain database to index the data from
indexDb ctxcdb.Database // Prefixed table-view of the db to write index metadata into
backend ChainIndexerBackend // Background processor generating the index data content
children []*ChainIndexer // Child indexers to cascade chain updates to

Expand Down
2 changes: 1 addition & 1 deletion core/gen_genesis_account.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion core/genesis_alloc.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ package core
// Constants containing the genesis allocation of built-in genesis blocks.
// Their content is an RLP-encoded list of (address, balance) tuples.
// Use mkalloc.go to create/update them.

2 changes: 1 addition & 1 deletion core/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import (
"reflect"
"testing"

"github.com/davecgh/go-spew/spew"
"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/consensus/cuckoo"
"github.com/CortexFoundation/CortexTheseus/core/rawdb"
"github.com/CortexFoundation/CortexTheseus/core/vm"
"github.com/CortexFoundation/CortexTheseus/db"
"github.com/CortexFoundation/CortexTheseus/params"
"github.com/davecgh/go-spew/spew"
)

func TestPrintGenesisBlockHash(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion core/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ func Max(x, y *big.Int) *big.Int {
//vote to model
func (st *StateTransition) uploading() bool {
log.Debug("Vote tx", "to", st.msg.To(), "sign", st.value.Sign(), "uploading", st.state.Uploading(st.to()), "gas", st.gas, "limit", params.UploadGas)
return st.msg != nil && st.msg.To() != nil && st.value.Sign() == 0 && st.state.Uploading(st.to())// && st.gas >= params.UploadGas
return st.msg != nil && st.msg.To() != nil && st.value.Sign() == 0 && st.state.Uploading(st.to()) // && st.gas >= params.UploadGas
}

func (st *StateTransition) refundGas() {
Expand Down
29 changes: 14 additions & 15 deletions core/tx_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -436,22 +436,21 @@ func (l *txPricedList) Put(tx *types.Transaction) {
}*/

func (l *txPricedList) Removed(count int) {
// Bump the stale counter, but exit if still too low (< 25%)
l.stales += count
if l.stales <= len(*l.items)/4 {
return
}
// Seems we've reached a critical number of stale transactions, reheap
reheap := make(priceHeap, 0, l.all.Count())

l.stales, l.items = 0, &reheap
l.all.Range(func(hash common.Hash, tx *types.Transaction) bool {
*l.items = append(*l.items, tx)
return true
})
heap.Init(l.items)
}
// Bump the stale counter, but exit if still too low (< 25%)
l.stales += count
if l.stales <= len(*l.items)/4 {
return
}
// Seems we've reached a critical number of stale transactions, reheap
reheap := make(priceHeap, 0, l.all.Count())

l.stales, l.items = 0, &reheap
l.all.Range(func(hash common.Hash, tx *types.Transaction) bool {
*l.items = append(*l.items, tx)
return true
})
heap.Init(l.items)
}

// Cap finds all the transactions below the given price threshold, drops them
// from the priced list and returns them for further removal from the entire pool.
Expand Down
16 changes: 8 additions & 8 deletions core/types/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import (
"encoding/binary"
"io"
"math/big"
"sort"
//"sort"
"fmt"
"sync/atomic"
"time"
"unsafe"
"fmt"

"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/common/hexutil"
Expand Down Expand Up @@ -282,12 +282,12 @@ func CopyHeader(h *Header) *Header {
cpy.Quota.Set(h.Quota)
}
if cpy.QuotaUsed = new(big.Int); h.QuotaUsed != nil {
cpy.QuotaUsed.Set(h.QuotaUsed)
}
cpy.QuotaUsed.Set(h.QuotaUsed)
}

if cpy.Supply = new(big.Int); h.Supply != nil {
cpy.Supply.Set(h.Supply)
}
cpy.Supply.Set(h.Supply)
}
return &cpy
}

Expand Down Expand Up @@ -428,7 +428,7 @@ func (b *Block) Hash() common.Hash {

type Blocks []*Block

type BlockBy func(b1, b2 *Block) bool
/*type BlockBy func(b1, b2 *Block) bool
func (self BlockBy) Sort(blocks Blocks) {
bs := blockSorter{
Expand All @@ -449,4 +449,4 @@ func (self blockSorter) Swap(i, j int) {
}
func (self blockSorter) Less(i, j int) bool { return self.by(self.blocks[i], self.blocks[j]) }
func Number(b1, b2 *Block) bool { return b1.header.Number.Cmp(b2.header.Number) < 0 }
func Number(b1, b2 *Block) bool { return b1.header.Number.Cmp(b2.header.Number) < 0 }*/
13 changes: 6 additions & 7 deletions core/types/infer_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type InferMeta interface {
RawSize() uint64
// Gas() uint64
AuthorAddress() common.Address
InfoHash() metainfo.Hash
InfoHash() metainfo.Hash
Comment() string
}

Expand All @@ -53,12 +53,12 @@ type ModelMeta struct {
}

type InputMeta struct {
Comment string `json:"Comment"`
Hash common.Address `json:"Hash"`
RawSize uint64 `json:"RawSize"`
Shape []uint64 `json:"Shape"`
Comment string `json:"Comment"`
Hash common.Address `json:"Hash"`
RawSize uint64 `json:"RawSize"`
Shape []uint64 `json:"Shape"`
//AuthorAddress common.Address `json:"AuthorAddress"`
BlockNum big.Int `json:"BlockNum"`
BlockNum big.Int `json:"BlockNum"`

//RawBytes []byte `json:"RawBytes"`
}
Expand All @@ -73,7 +73,6 @@ func (mm *InputMeta) InfoHash() metainfo.Hash {
return ih
}


func (mm *Meta) InfoHash() metainfo.Hash {
ih := metainfo.NewHashFromHex(mm.Hash.String()[2:])
return ih
Expand Down
6 changes: 3 additions & 3 deletions core/types/infer_meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ func TestShit(t *testing.T) {
// new a modelmeta at 0x1001 and new a datameta at 0x2001

testInputMeta := &InputMeta{
Hash: ih,
RawSize: 10000,
Shape: []uint64{1},
Hash: ih,
RawSize: 10000,
Shape: []uint64{1},
//AuthorAddress: common.BytesToAddress(crypto.Keccak256([]byte{0x3})),
}
s := `
Expand Down
4 changes: 2 additions & 2 deletions core/vm/gas_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (

"github.com/CortexFoundation/CortexTheseus/common"
"github.com/CortexFoundation/CortexTheseus/common/math"
"github.com/CortexFoundation/CortexTheseus/params"
"github.com/CortexFoundation/CortexTheseus/log"
"github.com/CortexFoundation/CortexTheseus/params"
// "github.com/CortexFoundation/CortexTheseus/core/types"
)

Expand Down Expand Up @@ -552,7 +552,7 @@ func gasInferArray(gt params.GasTable, cvm *CVM, contract *Contract, stack *Stac
if errOps != nil {
return 0, errOps
}
modelGas := modelOps / params.InferOpsPerGas
modelGas := modelOps / params.InferOpsPerGas
if modelGas < params.CallInferGas {
modelGas = params.CallInferGas
}
Expand Down
6 changes: 3 additions & 3 deletions core/vm/instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,9 @@ func opPop(pc *uint64, interpreter *CVMInterpreter, contract *Contract, memory *

func opMload(pc *uint64, interpreter *CVMInterpreter, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
v := stack.peek()
offset := v.Int64()
v.SetBytes(memory.GetPtr(offset, 32))
return nil, nil
offset := v.Int64()
v.SetBytes(memory.GetPtr(offset, 32))
return nil, nil
}

func opMstore(pc *uint64, interpreter *CVMInterpreter, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
Expand Down
14 changes: 7 additions & 7 deletions core/vm/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
package vm

import (
"fmt"
"errors"
"fmt"
"math/big"

"github.com/CortexFoundation/CortexTheseus/common/math"
Expand Down Expand Up @@ -124,11 +124,11 @@ func (m *Memory) Print() {
fmt.Println("####################")
}

func (m* Memory) GetSolidityBytes(slot int64) ([]byte, error) {
func (m *Memory) GetSolidityBytes(slot int64) ([]byte, error) {
bigLen := big.NewInt(0)
length_buff := m.GetPtr(slot, 32)
bigLen.SetBytes(length_buff)
buff := m.GetPtr(slot + 32, bigLen.Int64())
buff := m.GetPtr(slot+32, bigLen.Int64())
return buff, nil
}

Expand All @@ -146,7 +146,7 @@ func (m* Memory) GetLengthOfSolidityUint256Array(slot int64) (uint64, error) {
return bigLen.Uint64(), nil
}*/

func (m* Memory) WriteSolidityUint256Array(slot int64, data []byte) error {
func (m *Memory) WriteSolidityUint256Array(slot int64, data []byte) error {
bigLen := big.NewInt(0)
length_buff := m.GetPtr(slot, 32)
bigLen.SetBytes(length_buff)
Expand All @@ -155,15 +155,15 @@ func (m* Memory) WriteSolidityUint256Array(slot int64, data []byte) error {
if int64(len(data)) > bigLen.Int64() {
return errors.New(fmt.Sprintf("solidity memory bytes length not match %d != %d", len(data), bigLen.Int64()))
}
m.Set(uint64(slot + 32), bigLen.Uint64(), data)
m.Set(uint64(slot+32), bigLen.Uint64(), data)
return nil
}

func (m* Memory) GetSolidityUint256(slot int64) ([]byte, error) {
func (m *Memory) GetSolidityUint256(slot int64) ([]byte, error) {
bigLen := big.NewInt(0)
length_buff := m.GetPtr(slot, 32)
bigLen.SetBytes(length_buff)
bigLen.Mul(bigLen, big.NewInt(32))
buff := m.GetPtr(slot + 32, bigLen.Int64())
buff := m.GetPtr(slot+32, bigLen.Int64())
return buff, nil
}
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/CortexFoundation/CortexTheseus
go 1.12

require (
github.com/Azure/azure-storage-blob-go v0.7.0
github.com/Azure/azure-storage-blob-go v0.8.0
github.com/Azure/go-autorest/autorest/adal v0.6.0 // indirect
github.com/allegro/bigcache v1.2.1
github.com/anacrolix/missinggo v1.2.1
Expand Down Expand Up @@ -50,9 +50,10 @@ require (
github.com/stretchr/testify v1.4.0
github.com/syndtr/goleveldb v1.0.0
golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297
golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914
golang.org/x/sys v0.0.0-20190910064555-bbd175535a8b
golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d
golang.org/x/tools v0.0.0-20191122080028-f774e2e2e5be
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190709231704-1e4459ed25ff
Expand Down
15 changes: 9 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/Azure/azure-pipeline-go v0.2.1 h1:OLBdZJ3yvOn2MezlWvbrBMTEUQC72zAftRZOMdj5HYo=
github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4=
github.com/Azure/azure-storage-blob-go v0.7.0 h1:MuueVOYkufCxJw5YZzF842DY2MBsp+hLuh2apKY0mck=
github.com/Azure/azure-storage-blob-go v0.7.0/go.mod h1:f9YQKtsG1nMisotuTPpO0tjNuEjKRYAcJU8/ydDI++4=
github.com/Azure/azure-storage-blob-go v0.8.0 h1:53qhf0Oxa0nOjgbDeeYPUeyiNmafAFEY95rZLK0Tj6o=
github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0=
github.com/Azure/go-autorest/autorest v0.9.0 h1:MRvx8gncNaXJqOoLmhNjUAKh33JJF8LyxPhomEtOsjs=
github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI=
github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0=
Expand Down Expand Up @@ -362,14 +362,15 @@ golang.org/x/net v0.0.0-20190318221613-d196dffd7c2b/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297 h1:k7pJ2yAPLPgbskkFdhRCsA77k2fySZ1zf2zCjvQCiIM=
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914 h1:MlY3mEfbnWGmUi4rtHOtNnnnN4UJRGSyLPx+DXA5Sq4=
golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand All @@ -394,10 +395,12 @@ golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGm
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d h1:yqT69RdmShXXRtsT9jS6Iy0FFLWGLCe3IqGE0vsP0m4=
golang.org/x/tools v0.0.0-20190829051458-42f498d34c4d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20191122080028-f774e2e2e5be h1:6d2MOtryvuMarrCTOqjhCZCVONST5uq4zNzBWKxzOls=
golang.org/x/tools v0.0.0-20191122080028-f774e2e2e5be/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
Expand Down
2 changes: 1 addition & 1 deletion inference/synapse/synapse.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type Synapse struct {
config *Config
simpleCache sync.Map
gasCache sync.Map
modelLock sync.Map
//modelLock sync.Map
mutex sync.Mutex
lib *kernel.LibCVM
caches map[int]*lru.Cache
Expand Down
8 changes: 4 additions & 4 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const (

// minRecommitInterval is the minimal time interval to recreate the mining block with
// any newly arrived transactions.
minRecommitInterval = 2 * time.Second
minRecommitInterval = 3 * time.Second

// maxRecommitInterval is the maximum time interval to recreate the mining block with
// any newly arrived transactions.
Expand Down Expand Up @@ -948,11 +948,11 @@ func (w *worker) commit(uncles []*types.Header, interval func(), update bool, st
}
feesCortex := new(big.Float).Quo(new(big.Float).SetInt(feesWei), new(big.Float).SetInt(big.NewInt(params.Cortex)))
mined := new(big.Float).Quo(new(big.Float).SetInt(new(big.Int).Sub(block.Supply(), params.CTXC_INIT)), new(big.Float).SetInt(big.NewInt(params.Cortex)))
peace := new(big.Float).Quo(new(big.Float).SetInt(block.Supply()), new(big.Float).SetInt(params.CTXC_TOP))
capacity := new(big.Float).Quo(new(big.Float).SetInt(block.QuotaUsed()), new(big.Float).SetInt(block.Quota()))
//peace := new(big.Float).Quo(new(big.Float).SetInt(block.Supply()), new(big.Float).SetInt(params.CTXC_TOP))
//capacity := new(big.Float).Quo(new(big.Float).SetInt(block.QuotaUsed()), new(big.Float).SetInt(block.Quota()))

log.Info("Commit new mining work", "number", block.Number(), "sealhash", w.engine.SealHash(block.Header()),
"uncles", len(uncles), "txs", w.current.tcount, "gas", block.GasUsed(), "fees", feesCortex, "elapsed", common.PrettyDuration(time.Since(start)), "diff", block.Difficulty(), "mined", mined, "peace", peace, "quota", block.Quota(), "used", block.QuotaUsed(), "capacity", capacity)
"uncles", len(uncles), "txs", w.current.tcount, "gas", block.GasUsed(), "fees", feesCortex, "elapsed", common.PrettyDuration(time.Since(start)), "diff", block.Difficulty(), "mined", mined /*"peace", peace,*/, "quota", block.Quota(), "used", block.QuotaUsed()) //, "capacity", capacity)

case <-w.exitCh:
log.Info("Worker has exited")
Expand Down
Loading

0 comments on commit a208a48

Please sign in to comment.