OSDN Git Service
(root)
/
bytom
/
bytom-spv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ea943a
)
fix x86-32 exeception for 64-bit aligned
author
oysheng
<oysheng@bytom.io>
Mon, 21 May 2018 02:51:33 +0000
(10:51 +0800)
committer
oysheng
<oysheng@bytom.io>
Mon, 21 May 2018 02:54:22 +0000
(10:54 +0800)
account/reserve.go
patch
|
blob
|
history
diff --git
a/account/reserve.go
b/account/reserve.go
index
c0dfbe1
..
40ff3ba
100644
(file)
--- a/
account/reserve.go
+++ b/
account/reserve.go
@@
-96,9
+96,11
@@
func newReserver(c *protocol.Chain, walletdb dbm.DB) *reserver {
// reserver ensures idempotency of reservations until the reservation
// expiration.
type reserver struct {
+ // `sync/atomic` expects the first word in an allocated struct to be 64-bit
+ // aligned on both ARM and x86-32. See https://goo.gl/zW7dgq for more details.
+ nextReservationID uint64
c *protocol.Chain
db dbm.DB
- nextReservationID uint64
idempotency idempotency.Group
reservationsMu sync.Mutex