Skip to content

Commit

Permalink
remove dead code, fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
whilei committed Nov 26, 2018
1 parent 3acff68 commit c50fa5f
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"e40505dc-09e8-4e21-b50e-2c7b0bad1136","address":"8e1508b37fee1d010d41677ce4125d89a95622ff","crypto":{"cipher":"aes-128-ctr","ciphertext":"0ddf17776b9527c85afeed4cc0461a8d67f335c10c3ca07ad9b387f952e714e7","cipherparams":{"iv":"af7a56e5a36b6ca28013ddd54bcd3d60"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"5a4077195deff5cc02176e76b56427e862d787f9fe9060db85ace47d5f161943"},"mac":"44d06ce13ced9d699fe341623dc8cd9a5cbf527bebf00aa74199eafe047fc2a5"},"version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"7943043e-463f-4bd9-94ab-c1b02699c1c1","address":"d2ec402750f958b670594f51d9c9cf61fe1bdc29","crypto":{"cipher":"aes-128-ctr","ciphertext":"cca0f30b92831bd4d81f639469fb1d1b2cb7e0e610ac9c259a37d1f13ec1653b","cipherparams":{"iv":"eecef50e6593fa6cbe8d3f5574275792"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"31dfae2bcc2110e3b3f45fe7f0cd1e22f84b52a4a752efd65559121775c29d4c"},"mac":"f4eb64612220bb49e20d8dba4349b4b1fc8b3036603f410fa75c46b064aa5f97"},"version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"a6056bb4-6b27-40e6-933c-7e138c297a0f","address":"dd6d99e42209f04aa5a1bdde5b91d72f39cc2dc8","crypto":{"cipher":"aes-128-ctr","ciphertext":"49f5551f596f2259f8163703a3b587c3e6119d7128de1cf0aed609047ab2f68c","cipherparams":{"iv":"70b702b7344f46cc168aec05e65a66bd"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"0f19a894c74e0458be2202e979cd0167e3bd08d593fe117cda28fe4b2dde5bb8"},"mac":"3db373d150b5822d5ff88bb05f66f0cbbe7c63a06ff2fd37e5bfe6dd4907d6b1"},"version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"25e7a122-bccd-4266-8db7-0b98a3de9ad8","address":"c25cdc40dacab9d613c6c7c942d5485155965f51","crypto":{"cipher":"aes-128-ctr","ciphertext":"c01784a642a6fae4e3402b93896d0973a46f5cd523924edbbc2d82aa3ad8f8ae","cipherparams":{"iv":"329b187e9f6a79c5e35af4fbcc3d420c"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"f310a544f8e3f08aa8f5d1c8246cc27f1777ba93c40fc22a606bd86f02f08581"},"mac":"6f7d1ec12f9f65a52df2d4731c519b991b16de8db692fbfe455cbfaafccc61c4"},"version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"27b85677-e720-4278-80af-6de89d1b0101","address":"a71248ce5c1438f50c2983ffee8e52ad53f367e0","crypto":{"cipher":"aes-128-ctr","ciphertext":"56d446a50ef9b51c3ac1c5b975cc08407fe93c3e63f5d837cbb457d66e6d12a3","cipherparams":{"iv":"5c4ad1fe6907f678b2ba571b077699f1"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"0b9c10749eaefbc9fe6bfa70b45a4e386fafecef6ecfb743e43244d1c2d6c758"},"mac":"d699462e7d10a19bb8957d0ba752675f0a028106801d976ce47d3006b8cd2956"},"version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"b425b473-66f6-4c60-b9a5-7771897a3ebd","address":"f1d66a96e4b5c86f48584baa9ff8170402e3ec74","crypto":{"cipher":"aes-128-ctr","ciphertext":"da07301195fc51d06981bf7fc64337616005a014b60528b086f3379dffad9798","cipherparams":{"iv":"c7b45fba9147f4770655712d9c319bf0"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"a9bb005f5306c4f27d67d6dd5b20274470f2001d735e8c5b35f3c53adb6e78af"},"mac":"047f0c76f837c15f4da49c88fbefbb30cf80c790d2debe6737e4406133f6f516"},"version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"0cb47cd1-af03-4e3f-bcf2-452b025c3ece","address":"8033778e2e86fb2b6ede5fc21f0c3d2f0167a293","crypto":{"cipher":"aes-128-ctr","ciphertext":"138e8c21ac972513507d6ab9ad3f3e914f84171aeada5a44cc5b74b051b73883","cipherparams":{"iv":"427df468351abfaab33b9e99bc466e59"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"0090efd306e82dd04a43e31449e92c1346c6d6325cdc7bfd76156981f3dfcf7b"},"mac":"0c640b00fb26d5dde8dcb60f6d9c263d0a4db164047adbdc7dfa7c6a02649581"},"version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"ffb4677e-279c-4081-8c3e-89ce1e12054f","address":"34096924edfb2bc195382b607c1656587f9234a8","crypto":{"cipher":"aes-128-ctr","ciphertext":"c584328631ff48606cb94a400d4fe120ef855b603af3e032f1f37ec1b061f7a0","cipherparams":{"iv":"df0953d510ab061aadf247169c3f6a50"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"77df1c13428bc02cec5d24dbd23fbd1b2cf9c10933c1e847af66f4478ba8a697"},"mac":"a1b30a1c25ef1b942405e2a31033b99624586408d5e4dd089296fed69de1fe4f"},"version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"cadcea8f-5391-4a0a-a36b-bec9ae6ef30f","address":"338fe4549413d4ab1d893fa7891f0879067fdeee","crypto":{"cipher":"aes-128-ctr","ciphertext":"9e02834aea831100afa7e1ecfff1cb2c61f41aa5f86ba78499eb1cf03929f0db","cipherparams":{"iv":"cf0034975877afd008b4886544e36e6b"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"3dcbbc6ce04845ce7f5eca0ccf7d2385b85ba4415ddc52028c1391b953a55faa"},"mac":"ab3a2882817fa265ee001133db5da41579d56f4e32bc3588a221fef2d1fac414"},"version":3}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"2e9c6f9b-60f5-4143-b1bb-806210687a25","address":"2f7c5a92cfd55d113e1460e61dc1eb787548d033","crypto":{"cipher":"aes-128-ctr","ciphertext":"7df45f2081b9e7f92b743731b259ecd037b65a6ecd6df2e046888cf7e858fcdd","cipherparams":{"iv":"f49e2cd91e56a299b0c22c5043cfc33a"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"af43bf521e5a2bc9c8769deaea02d3deb8728bf51b8906fecd77ab58687e6a0f"},"mac":"b57d22d3829c069d5592c1b7eb9e3ef94987c77ab5e03908c729229a3f7273cf"},"version":3}
14 changes: 1 addition & 13 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ func (self *worker) unregister(agent Agent) {

func (self *worker) update() {
glog.D(logger.Warn).Infoln("miner worker updating:", "AUTOMINE")
// var txPreN = 0
for event := range self.events.Chan() {
var t = time.Now()
switch ev := event.Data.(type) {
Expand All @@ -235,21 +234,15 @@ func (self *worker) update() {
self.uncleMu.Unlock()
case core.TxPreEvent:
if self.config.Automine {
// if txPreN < 2 {
// txPreN++
// continue
// }
// txPreN = 0
if atomic.LoadInt32(&self.mining) == 0 {
self.start()
} else {
// If many txs are fired at geth at once, they will be included in blocks more quickly than this event will be processed, causing ~200+ transactions per block, and yielding many empty blocks after the burst is complete as the channel drains. This conditional simply
// If many txs are fired at geth at once, they will be included in blocks more quickly than this event will be processed, causing ~200+ transactions per block, and yielding many empty blocks after the burst is complete as the channel drains. This conditional simply ensure that there are actually transactions to add a next block. If not, the event is essentially ignored.
pending, queued := self.eth.TxPool().Stats()
if pending+queued == 0 {
continue
}
glog.D(logger.Info).Infoln("+tx: ", ev.Tx.Hash().Hex()[:9], "p=", pending, "q=", queued, "took=", time.Since(t))
t = time.Now()

self.currentMu.Lock()
ww := self.current
Expand Down Expand Up @@ -289,11 +282,6 @@ func newLocalMinedBlock(blockNumber uint64, prevMinedBlocks *uint64RingBuffer) (
return minedBlocks
}

func (self *worker) autowait() {
for {
}
}

// wait waits for agent to find new a new solved block
func (self *worker) wait() {
for {
Expand Down

0 comments on commit c50fa5f

Please sign in to comment.