mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
fix: use correct CGo syntax for Free (#478)
This commit is contained in:
parent
e85c70c156
commit
ef893170bc
1 changed files with 2 additions and 2 deletions
|
|
@ -73,7 +73,7 @@ func (ccc *CircuitCapacityChecker) ApplyTransaction(traces *types.BlockTrace) (*
|
||||||
log.Debug("start to check circuit capacity for tx", "id", ccc.ID, "TxHash", traces.Transactions[0].TxHash)
|
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)
|
rawResult := C.apply_tx(C.uint64_t(ccc.ID), tracesStr)
|
||||||
defer func() {
|
defer func() {
|
||||||
C.free(rawResult)
|
C.free(unsafe.Pointer(rawResult))
|
||||||
}()
|
}()
|
||||||
log.Debug("check circuit capacity for tx done", "id", ccc.ID, "TxHash", traces.Transactions[0].TxHash)
|
log.Debug("check circuit capacity for tx done", "id", ccc.ID, "TxHash", traces.Transactions[0].TxHash)
|
||||||
|
|
||||||
|
|
@ -122,7 +122,7 @@ 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())
|
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)
|
rawResult := C.apply_block(C.uint64_t(ccc.ID), tracesStr)
|
||||||
defer func() {
|
defer func() {
|
||||||
C.free(rawResult)
|
C.free(unsafe.Pointer(rawResult))
|
||||||
}()
|
}()
|
||||||
log.Debug("check circuit capacity for block done", "id", ccc.ID, "blockNumber", traces.Header.Number, "blockHash", traces.Header.Hash())
|
log.Debug("check circuit capacity for block done", "id", ccc.ID, "blockNumber", traces.Header.Number, "blockHash", traces.Header.Hash())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue