Skip to content

Commit

Permalink
delete ReportItem guarantors
Browse files Browse the repository at this point in the history
  • Loading branch information
MacOMNI committed Aug 19, 2024
1 parent 6b78d98 commit dcc3a4d
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Blockchain/Sources/Blockchain/Types/State.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ import Utils
public struct State: Sendable {
public struct ReportItem: Sendable, Equatable {
public var workReport: WorkReport
public var guarantors: LimitedSizeArray<Ed25519PublicKey, ConstInt2, ConstInt3>
public var timeslot: TimeslotIndex

public init(
workReport: WorkReport,
guarantors: LimitedSizeArray<Ed25519PublicKey, ConstInt2, ConstInt3>,
timeslot: TimeslotIndex
) {
self.workReport = workReport
self.guarantors = guarantors
self.timeslot = timeslot
}
}
Expand Down Expand Up @@ -204,14 +201,12 @@ extension State.ReportItem: ScaleCodec.Encodable {
public init(config: ProtocolConfigRef, from decoder: inout some ScaleCodec.Decoder) throws {
try self.init(
workReport: WorkReport(config: config, from: &decoder),
guarantors: decoder.decode(),
timeslot: decoder.decode()
)
}

public func encode(in encoder: inout some ScaleCodec.Encoder) throws {
try encoder.encode(workReport)
try encoder.encode(guarantors)
try encoder.encode(timeslot)
}
}
Expand Down

0 comments on commit dcc3a4d

Please sign in to comment.