CompositeKey.NodeAndWeight - corda

corda / net.corda.core.crypto / CompositeKey / NodeAndWeight

# NodeAndWeight

`data class NodeAndWeight : Comparable<NodeAndWeight>, ASN1Object`

Holds node - weight pairs for a CompositeKey. Ordered first by weight, then by node's hashCode. Each node should be assigned with a positive weight to avoid certain types of weight underflow attacks.

### Constructors

#### <init> | Holds node - weight pairs for a CompositeKey. Ordered first by weight, then by node's hashCode. Each node should be assigned with a positive weight to avoid certain types of weight underflow attacks. `NodeAndWeight(node: PublicKey, weight: Int)`

### Properties

#### node | `val node: PublicKey`
#### weight | `val weight: Int`

### Functions

#### compareTo | `fun compareTo(other: NodeAndWeight): Int`
#### toASN1Primitive | `fun toASN1Primitive(): ASN1Primitive`
#### toString | `fun toString(): String`