aboutsummaryrefslogtreecommitdiffstats
path: root/miner/worker.go
diff options
context:
space:
mode:
authorJason Carver <ut96caarrs@snkmail.com>2015-05-24 03:04:00 +0800
committerJason Carver <ut96caarrs@snkmail.com>2015-05-24 03:09:59 +0800
commitf1ce5877badf5624a5fc5214dc18086b930c8d38 (patch)
tree5cc8e5b8cc684b3f66c823bf1baa9442424c2b93 /miner/worker.go
parent8a7fb5fd342ee9d4c2e8609d4c008f12c5956a41 (diff)
downloadgo-tangerine-f1ce5877badf5624a5fc5214dc18086b930c8d38.tar
go-tangerine-f1ce5877badf5624a5fc5214dc18086b930c8d38.tar.gz
go-tangerine-f1ce5877badf5624a5fc5214dc18086b930c8d38.tar.bz2
go-tangerine-f1ce5877badf5624a5fc5214dc18086b930c8d38.tar.lz
go-tangerine-f1ce5877badf5624a5fc5214dc18086b930c8d38.tar.xz
go-tangerine-f1ce5877badf5624a5fc5214dc18086b930c8d38.tar.zst
go-tangerine-f1ce5877badf5624a5fc5214dc18086b930c8d38.zip
do not export ring buffer struct
Diffstat (limited to 'miner/worker.go')
-rw-r--r--miner/worker.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 937e98e43..6f618d632 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -40,7 +40,7 @@ type Agent interface {
const miningLogAtDepth = 5
-type UInt64RingBuffer struct {
+type uint64RingBuffer struct {
ints []uint64 //array of all integers in buffer
next int //where is the next insertion? assert 0 <= next < len(ints)
}
@@ -61,7 +61,7 @@ type environment struct {
lowGasTransactors *set.Set
ownedAccounts *set.Set
lowGasTxs types.Transactions
- localMinedBlocks *UInt64RingBuffer // the most recent block numbers that were mined locally (used to check block inclusion)
+ localMinedBlocks *uint64RingBuffer // the most recent block numbers that were mined locally (used to check block inclusion)
}
// env returns a new environment for the current cycle
@@ -217,9 +217,9 @@ out:
events.Unsubscribe()
}
-func newLocalMinedBlock(blockNumber uint64, prevMinedBlocks *UInt64RingBuffer) (minedBlocks *UInt64RingBuffer) {
+func newLocalMinedBlock(blockNumber uint64, prevMinedBlocks *uint64RingBuffer) (minedBlocks *uint64RingBuffer) {
if prevMinedBlocks == nil {
- minedBlocks = &UInt64RingBuffer{next: 0, ints: make([]uint64, miningLogAtDepth)}
+ minedBlocks = &uint64RingBuffer{next: 0, ints: make([]uint64, miningLogAtDepth)}
} else {
minedBlocks = prevMinedBlocks
}