OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change interval
[bytom/vapor.git]
/
protocol
/
block.go
diff --git
a/protocol/block.go
b/protocol/block.go
index
6300951
..
86c9650
100644
(file)
--- a/
protocol/block.go
+++ b/
protocol/block.go
@@
-265,11
+265,7
@@
func (c *Chain) saveBlock(block *types.Block) error {
return err
}
return err
}
- if err := consensusResult.AttachCoinbaseReward(block); err != nil {
- return err
- }
-
- rewards, err := consensusResult.GetCoinbaseRewards(block.Height)
+ rewards, err := consensusResult.GetCoinbaseRewards(parent.Height)
if err != nil {
return err
}
if err != nil {
return err
}
@@
-353,7
+349,7
@@
func (c *Chain) blockProcesser() {
func (c *Chain) processBlock(block *types.Block) (bool, error) {
blockHash := block.Hash()
if c.BlockExist(&blockHash) {
func (c *Chain) processBlock(block *types.Block) (bool, error) {
blockHash := block.Hash()
if c.BlockExist(&blockHash) {
- log.WithFields(log.Fields{"module": logModule, "hash": blockHash.String(), "height": block.Height}).
Info
("block has been processed")
+ log.WithFields(log.Fields{"module": logModule, "hash": blockHash.String(), "height": block.Height}).
Debug
("block has been processed")
return c.orphanManage.BlockExist(&blockHash), nil
}
return c.orphanManage.BlockExist(&blockHash), nil
}