Skip to content

Commit ae7c8ed

Browse files
world/block.go: Fix incorrect unknownBlock hash checking
1 parent 5fe94f9 commit ae7c8ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/world/block.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ func BlockRuntimeID(b Block) uint32 {
181181
if b == nil {
182182
return airRID
183183
}
184-
if h := BlockHash(b); h != math.MaxUint64 {
184+
if _, h := b.Hash(); h != math.MaxUint64 {
185185
// b is not an unknownBlock.
186-
if rid, ok := hashes.Get(int64(h)); ok {
186+
if rid, ok := hashes.Get(int64(BlockHash(b))); ok {
187187
return uint32(rid)
188188
}
189189
panic(fmt.Sprintf("cannot find block by non-0 hash of block %#v", b))

0 commit comments

Comments
 (0)