Skip to content

Commit 9c3ac4c

Browse files
authored
Expose prepareChecksumData as Bytes
It's useful to expose a raw representation, and most other chain SDKs provide a way to get a byte slice.
1 parent 89cc955 commit 9c3ac4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

address/addr.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,10 @@ func ParseRawAddr(addr string) (*Address, error) {
267267
}
268268

269269
func (a *Address) Checksum() uint16 {
270-
return crc16.Checksum(a.prepareChecksumData(), crc16.MakeTable(crc16.CRC16_XMODEM))
270+
return crc16.Checksum(a.Bytes(), crc16.MakeTable(crc16.CRC16_XMODEM))
271271
}
272272

273-
func (a *Address) prepareChecksumData() []byte {
273+
func (a *Address) Bytes() []byte {
274274
var data [34]byte
275275
data[0] = a.FlagsToByte()
276276
data[1] = byte(a.workchain)

0 commit comments

Comments
 (0)