setChainAddr static method

void setChainAddr(
  1. ByteBuffer addr,
  2. int chain
)

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
}