Skip to content
Permalink
Browse files

Added processed flag

This will help third party apps to check wether or not any post processing is needed in the form of changes types or the likes

	modified:   importer.go
  • Loading branch information...
maran committed Apr 8, 2015
1 parent e6dbc20 commit 7bea43494a539c1e69b92fe9613d0940ef33f044
Showing with 2 additions and 1 deletion.
  1. +2 −1 importer.go
@@ -58,6 +58,7 @@ type Block struct {
Nonce string
StorageSize string `bson:"storage_size"`
MixDigest string `bson:"mix_digest"`
Processed bool `bson:"processed"`
Id *bson.ObjectId `bson:"_id,omitempty"`
}

@@ -82,7 +83,7 @@ func (self *ImportMaster) importBlock(block *types.Block) {
blockHash := block.Header().Hash().Hex()
txAmount := uint64(len(block.Transactions()))
clilogger.Infoln("Importing block", blockHash, "Hash transactions:", txAmount)
err := self.blockCollection.Insert(&Block{blockHash, block.ParentHash().Hex(), block.Header().UncleHash.Hex(), block.Header().Coinbase.Hex(), block.Header().Root.Hex(), block.Header().TxHash.Hex(), block.Header().ReceiptHash.Hex(), block.Header().Number.String(), block.Header().Difficulty.String(), block.Header().GasLimit.String(), block.Header().GasUsed.String(), block.Header().Time, txAmount, string(block.Nonce()), block.Size().String(), block.Header().MixDigest.Hex(), nil})
err := self.blockCollection.Insert(&Block{blockHash, block.ParentHash().Hex(), block.Header().UncleHash.Hex(), block.Header().Coinbase.Hex(), block.Header().Root.Hex(), block.Header().TxHash.Hex(), block.Header().ReceiptHash.Hex(), block.Header().Number.String(), block.Header().Difficulty.String(), block.Header().GasLimit.String(), block.Header().GasUsed.String(), block.Header().Time, txAmount, string(block.Nonce()), block.Size().String(), block.Header().MixDigest.Hex(), false, nil})
if err != nil {
clilogger.Infoln(err)
}

0 comments on commit 7bea434

Please sign in to comment.
You can’t perform that action at this time.