Skip to content

Commit

Permalink
test:fix 64-bit unaligned in arch 386
Browse files Browse the repository at this point in the history
  • Loading branch information
bysomeone committed May 25, 2024
1 parent 54980d7 commit 2c1f280
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,23 @@ jobs:
make build_ci
make autotest dapp=all
make docker-compose && make docker-compose-down
test-goarch-386:
name: Run test cases with GOARCH=386
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'

- name: Build
run: make build
env:
GOARCH: 386

- name: Run test in 386
run: go test ./... -covermode=atomic
env:
GOARCH: 386
2 changes: 1 addition & 1 deletion blockchain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ type BlockChain struct {

// 永久存储数据到db中
blockStore *BlockStore
finalizer *finalizer
push *Push
//cache 缓存block方便快速查询
cfg *types.BlockChain
Expand Down Expand Up @@ -150,6 +149,7 @@ type BlockChain struct {
// 是否正在下载chunk
chunkDownloading int32
forkPointChan chan int64
finalizer *finalizer
}

// New new
Expand Down

0 comments on commit 2c1f280

Please sign in to comment.