Skip to content

Commit 1d824f4

Browse files
authored
fix(ccc): fix CCC build errors (#506)
1 parent 7d79f27 commit 1d824f4

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

params/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
const (
2525
VersionMajor = 4 // Major version component of the current release
2626
VersionMinor = 4 // Minor version component of the current release
27-
VersionPatch = 3 // Patch version component of the current release
27+
VersionPatch = 4 // Patch version component of the current release
2828
VersionMeta = "sepolia" // Version metadata to append to the version string
2929
)
3030

rollup/circuitcapacitychecker/impl.go

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import "C" //nolint:typecheck
1111

1212
import (
1313
"encoding/json"
14+
"fmt"
1415
"sync"
1516
"unsafe"
1617

@@ -147,7 +148,7 @@ func (ccc *CircuitCapacityChecker) ApplyBlock(traces *types.BlockTrace) (*types.
147148
}
148149

149150
// CheckTxNum compares whether the tx_count in ccc match the expected
150-
func (ccc *CircuitCapacityChecker) CheckTxNum(expected int) (bool, unit64, error) {
151+
func (ccc *CircuitCapacityChecker) CheckTxNum(expected int) (bool, uint64, error) {
151152
ccc.Lock()
152153
defer ccc.Unlock()
153154

@@ -159,14 +160,12 @@ func (ccc *CircuitCapacityChecker) CheckTxNum(expected int) (bool, unit64, error
159160
log.Debug("ccc get_tx_num end", "id", ccc.ID)
160161

161162
result := &WrappedTxNum{}
162-
if err = json.Unmarshal([]byte(C.GoString(rawResult)), result); err != nil {
163-
log.Error("fail to json unmarshal get_tx_num result", "id", ccc.ID, "err", err)
164-
return false, 0, ErrUnknown
163+
if err := json.Unmarshal([]byte(C.GoString(rawResult)), result); err != nil {
164+
return false, 0, fmt.Errorf("fail to json unmarshal get_tx_num result, id: %d, err: %w", ccc.ID, err)
165165
}
166166
if result.Error != "" {
167-
log.Error("fail to get_tx_num in CircuitCapacityChecker", "id", ccc.ID, "err", result.Error)
168-
return false, 0, ErrUnknown
167+
return false, 0, fmt.Errorf("fail to get_tx_num in CircuitCapacityChecker, id: %d, err: %w", ccc.ID, result.Error)
169168
}
170169

171-
return result.TxNum == unit64(expected), result.TxNum, nil
170+
return result.TxNum == uint64(expected), result.TxNum, nil
172171
}

0 commit comments

Comments
 (0)