LightClientAttackEvidence constructor

LightClientAttackEvidence({
  1. LightBlock? conflictingBlock,
  2. Int64? commonHeight,
  3. Iterable<Validator>? byzantineValidators,
  4. Int64? totalVotingPower,
  5. Timestamp? timestamp,
})

Implementation

factory LightClientAttackEvidence({
  $5.LightBlock? conflictingBlock,
  $fixnum.Int64? commonHeight,
  $core.Iterable<$4.Validator>? byzantineValidators,
  $fixnum.Int64? totalVotingPower,
  $3.Timestamp? timestamp,
}) {
  final _result = create();
  if (conflictingBlock != null) {
    _result.conflictingBlock = conflictingBlock;
  }
  if (commonHeight != null) {
    _result.commonHeight = commonHeight;
  }
  if (byzantineValidators != null) {
    _result.byzantineValidators.addAll(byzantineValidators);
  }
  if (totalVotingPower != null) {
    _result.totalVotingPower = totalVotingPower;
  }
  if (timestamp != null) {
    _result.timestamp = timestamp;
  }
  return _result;
}