setChainAddr static method
Set chain address in the address buffer. Modifies the provided ByteBuffer's position and writes the chain value.
@param addr The ByteBuffer representing the address. @param chain The chain address value (integer).
Implementation
static void setChainAddr(ByteBuffer addr, int chain) {
addr.position(20); // Set position to byte 20
addr.putInt(chain); // Write the integer value
}