mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-05 18:42:19 +00:00
aeed1657c7
* Clean up code duplication between IntraBlockState's FinalizeTx & CommitBlock * checkChangeSets command * linter * First attempt at checking account changes * Reuse runBlock in CheckChangeSets * linter * linter * Optionally include no-changes in the ChangeSets * linter * Detect storage changes for account change sets * Fix post-merge compilation errors * Use database format compatible with !debug.IsThinHistory() * PrintChangedAccounts in ChangeSetWriter * Avoid out-of-bounds access * Storage changes * hack FirstContractIncarnation * Call ChangeSetWriter only once per block
21 lines
543 B
Go
21 lines
543 B
Go
package commands
|
|
|
|
import (
|
|
"github.com/ledgerwatch/turbo-geth/cmd/state/stateless"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
withBlock(checkChangeSetsCmd)
|
|
withChaindata(checkChangeSetsCmd)
|
|
rootCmd.AddCommand(checkChangeSetsCmd)
|
|
}
|
|
|
|
var checkChangeSetsCmd = &cobra.Command{
|
|
Use: "checkChangeSets",
|
|
Short: "Re-executes historical transactions in read-only mode and checks that their outputs match the database ChangeSets",
|
|
RunE: func(cmd *cobra.Command, args []string) error {
|
|
return stateless.CheckChangeSets(block, chaindata)
|
|
},
|
|
}
|