mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
fix: free raw result returned from CCC (#477)
This commit is contained in:
parent
be1600f078
commit
e85c70c156
2 changed files with 7 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ import (
|
|||
const (
|
||||
VersionMajor = 4 // Major version component of the current release
|
||||
VersionMinor = 3 // Minor version component of the current release
|
||||
VersionPatch = 44 // Patch version component of the current release
|
||||
VersionPatch = 45 // Patch version component of the current release
|
||||
VersionMeta = "sepolia" // Version metadata to append to the version string
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -72,6 +72,9 @@ func (ccc *CircuitCapacityChecker) ApplyTransaction(traces *types.BlockTrace) (*
|
|||
|
||||
log.Debug("start to check circuit capacity for tx", "id", ccc.ID, "TxHash", traces.Transactions[0].TxHash)
|
||||
rawResult := C.apply_tx(C.uint64_t(ccc.ID), tracesStr)
|
||||
defer func() {
|
||||
C.free(rawResult)
|
||||
}()
|
||||
log.Debug("check circuit capacity for tx done", "id", ccc.ID, "TxHash", traces.Transactions[0].TxHash)
|
||||
|
||||
result := &WrappedRowUsage{}
|
||||
|
|
@ -118,6 +121,9 @@ func (ccc *CircuitCapacityChecker) ApplyBlock(traces *types.BlockTrace) (*types.
|
|||
|
||||
log.Debug("start to check circuit capacity for block", "id", ccc.ID, "blockNumber", traces.Header.Number, "blockHash", traces.Header.Hash())
|
||||
rawResult := C.apply_block(C.uint64_t(ccc.ID), tracesStr)
|
||||
defer func() {
|
||||
C.free(rawResult)
|
||||
}()
|
||||
log.Debug("check circuit capacity for block done", "id", ccc.ID, "blockNumber", traces.Header.Number, "blockHash", traces.Header.Hash())
|
||||
|
||||
result := &WrappedRowUsage{}
|
||||
|
|
|
|||
Loading…
Reference in a new issue