WritePrivateStateRoot writes the root(hash) for private state associated with the root of Merkle tree in public chain.
(db database.Database, blockRoot, root common.Hash)
| 46 | |
| 47 | // WritePrivateStateRoot writes the root(hash) for private state associated with the root of Merkle tree in public chain. |
| 48 | func WritePrivateStateRoot(db database.Database, blockRoot, root common.Hash) error { |
| 49 | return db.Put(append(privateRootPrefix, blockRoot[:]...), root[:]) |
| 50 | } |
| 51 | |
| 52 | // WritePrivateReceipt writes private receipt associated with specified transaction. |
| 53 | func WritePrivateReceipt(receipt *types.Receipt, txHash common.Hash, db database.Database) error { |