@@ -35,7 +35,12 @@ var UtxoValidationRules = []common.UtxoValidationRuleFunc{
35
35
}
36
36
37
37
// UtxoValidateOutsideValidityIntervalUtxo ensures that the current tip slot has reached the specified validity interval
38
- func UtxoValidateOutsideValidityIntervalUtxo (tx common.Transaction , slot uint64 , _ common.LedgerState , _ common.ProtocolParameters ) error {
38
+ func UtxoValidateOutsideValidityIntervalUtxo (
39
+ tx common.Transaction ,
40
+ slot uint64 ,
41
+ _ common.LedgerState ,
42
+ _ common.ProtocolParameters ,
43
+ ) error {
39
44
validityIntervalStart := tx .ValidityIntervalStart ()
40
45
if validityIntervalStart == 0 || slot >= validityIntervalStart {
41
46
return nil
@@ -46,54 +51,119 @@ func UtxoValidateOutsideValidityIntervalUtxo(tx common.Transaction, slot uint64,
46
51
}
47
52
}
48
53
49
- func UtxoValidateInputSetEmptyUtxo (tx common.Transaction , slot uint64 , ls common.LedgerState , pp common.ProtocolParameters ) error {
54
+ func UtxoValidateInputSetEmptyUtxo (
55
+ tx common.Transaction ,
56
+ slot uint64 ,
57
+ ls common.LedgerState ,
58
+ pp common.ProtocolParameters ,
59
+ ) error {
50
60
return shelley .UtxoValidateInputSetEmptyUtxo (tx , slot , ls , pp )
51
61
}
52
62
53
- func UtxoValidateFeeTooSmallUtxo (tx common.Transaction , slot uint64 , ls common.LedgerState , pp common.ProtocolParameters ) error {
63
+ func UtxoValidateFeeTooSmallUtxo (
64
+ tx common.Transaction ,
65
+ slot uint64 ,
66
+ ls common.LedgerState ,
67
+ pp common.ProtocolParameters ,
68
+ ) error {
54
69
tmpPparams , ok := pp .(* AllegraProtocolParameters )
55
70
if ! ok {
56
71
return fmt .Errorf ("pparams are not expected type" )
57
72
}
58
- return shelley .UtxoValidateFeeTooSmallUtxo (tx , slot , ls , & tmpPparams .ShelleyProtocolParameters )
73
+ return shelley .UtxoValidateFeeTooSmallUtxo (
74
+ tx ,
75
+ slot ,
76
+ ls ,
77
+ & tmpPparams .ShelleyProtocolParameters ,
78
+ )
59
79
}
60
80
61
- func UtxoValidateBadInputsUtxo (tx common.Transaction , slot uint64 , ls common.LedgerState , pp common.ProtocolParameters ) error {
81
+ func UtxoValidateBadInputsUtxo (
82
+ tx common.Transaction ,
83
+ slot uint64 ,
84
+ ls common.LedgerState ,
85
+ pp common.ProtocolParameters ,
86
+ ) error {
62
87
return shelley .UtxoValidateBadInputsUtxo (tx , slot , ls , pp )
63
88
}
64
89
65
- func UtxoValidateWrongNetwork (tx common.Transaction , slot uint64 , ls common.LedgerState , pp common.ProtocolParameters ) error {
90
+ func UtxoValidateWrongNetwork (
91
+ tx common.Transaction ,
92
+ slot uint64 ,
93
+ ls common.LedgerState ,
94
+ pp common.ProtocolParameters ,
95
+ ) error {
66
96
return shelley .UtxoValidateWrongNetwork (tx , slot , ls , pp )
67
97
}
68
98
69
- func UtxoValidateWrongNetworkWithdrawal (tx common.Transaction , slot uint64 , ls common.LedgerState , pp common.ProtocolParameters ) error {
99
+ func UtxoValidateWrongNetworkWithdrawal (
100
+ tx common.Transaction ,
101
+ slot uint64 ,
102
+ ls common.LedgerState ,
103
+ pp common.ProtocolParameters ,
104
+ ) error {
70
105
return shelley .UtxoValidateWrongNetworkWithdrawal (tx , slot , ls , pp )
71
106
}
72
107
73
- func UtxoValidateValueNotConservedUtxo (tx common.Transaction , slot uint64 , ls common.LedgerState , pp common.ProtocolParameters ) error {
108
+ func UtxoValidateValueNotConservedUtxo (
109
+ tx common.Transaction ,
110
+ slot uint64 ,
111
+ ls common.LedgerState ,
112
+ pp common.ProtocolParameters ,
113
+ ) error {
74
114
tmpPparams , ok := pp .(* AllegraProtocolParameters )
75
115
if ! ok {
76
116
return fmt .Errorf ("pparams are not expected type" )
77
117
}
78
- return shelley .UtxoValidateValueNotConservedUtxo (tx , slot , ls , & tmpPparams .ShelleyProtocolParameters )
118
+ return shelley .UtxoValidateValueNotConservedUtxo (
119
+ tx ,
120
+ slot ,
121
+ ls ,
122
+ & tmpPparams .ShelleyProtocolParameters ,
123
+ )
79
124
}
80
125
81
- func UtxoValidateOutputTooSmallUtxo (tx common.Transaction , slot uint64 , ls common.LedgerState , pp common.ProtocolParameters ) error {
126
+ func UtxoValidateOutputTooSmallUtxo (
127
+ tx common.Transaction ,
128
+ slot uint64 ,
129
+ ls common.LedgerState ,
130
+ pp common.ProtocolParameters ,
131
+ ) error {
82
132
tmpPparams , ok := pp .(* AllegraProtocolParameters )
83
133
if ! ok {
84
134
return fmt .Errorf ("pparams are not expected type" )
85
135
}
86
- return shelley .UtxoValidateOutputTooSmallUtxo (tx , slot , ls , & tmpPparams .ShelleyProtocolParameters )
136
+ return shelley .UtxoValidateOutputTooSmallUtxo (
137
+ tx ,
138
+ slot ,
139
+ ls ,
140
+ & tmpPparams .ShelleyProtocolParameters ,
141
+ )
87
142
}
88
143
89
- func UtxoValidateOutputBootAddrAttrsTooBig (tx common.Transaction , slot uint64 , ls common.LedgerState , pp common.ProtocolParameters ) error {
144
+ func UtxoValidateOutputBootAddrAttrsTooBig (
145
+ tx common.Transaction ,
146
+ slot uint64 ,
147
+ ls common.LedgerState ,
148
+ pp common.ProtocolParameters ,
149
+ ) error {
90
150
return shelley .UtxoValidateOutputBootAddrAttrsTooBig (tx , slot , ls , pp )
91
151
}
92
152
93
- func UtxoValidateMaxTxSizeUtxo (tx common.Transaction , slot uint64 , ls common.LedgerState , pp common.ProtocolParameters ) error {
153
+ func UtxoValidateMaxTxSizeUtxo (
154
+ tx common.Transaction ,
155
+ slot uint64 ,
156
+ ls common.LedgerState ,
157
+ pp common.ProtocolParameters ,
158
+ ) error {
94
159
tmpPparams , ok := pp .(* AllegraProtocolParameters )
95
160
if ! ok {
96
161
return fmt .Errorf ("pparams are not expected type" )
97
162
}
98
- return shelley .UtxoValidateMaxTxSizeUtxo (tx , slot , ls , & tmpPparams .ShelleyProtocolParameters )
163
+ return shelley .UtxoValidateMaxTxSizeUtxo (
164
+ tx ,
165
+ slot ,
166
+ ls ,
167
+ & tmpPparams .ShelleyProtocolParameters ,
168
+ )
99
169
}
0 commit comments