From 4593de520ee64fe861cd8e6626cab0c3e95e3542 Mon Sep 17 00:00:00 2001 From: weiihann Date: Tue, 21 Jan 2025 09:40:09 +0800 Subject: [PATCH] fix AppendBit bug --- core/trie/bitarray.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/trie/bitarray.go b/core/trie/bitarray.go index 8ba7caa13..90fe8b366 100644 --- a/core/trie/bitarray.go +++ b/core/trie/bitarray.go @@ -323,7 +323,7 @@ func (b *BitArray) Append(x, y *BitArray) *BitArray { // Sets the bit array to the concatenation of x and a single bit. func (b *BitArray) AppendBit(x *BitArray, bit uint8) *BitArray { - return b.Append(b, new(BitArray).SetBit(bit)) + return b.Append(x, new(BitArray).SetBit(bit)) } // Sets the bit array to a subset of x from startPos (inclusive) to endPos (exclusive),