@@ -88,6 +88,10 @@ impl<N: Network> RegisterTypes<N> {
8888 Operand :: BlockHeight => bail ! (
8989 "Struct member '{struct_name}.{member_name}' cannot be from a block height in a non-finalize scope"
9090 ) ,
91+ // If the operand is a block timestamp type, throw an error.
92+ Operand :: BlockTimestamp => bail ! (
93+ "Struct member '{struct_name}.{member_name}' cannot be from a block timestamp in a non-finalize scope"
94+ ) ,
9195 // If the operand is a network ID type, throw an error.
9296 Operand :: NetworkID => bail ! (
9397 "Struct member '{struct_name}.{member_name}' cannot be from a network ID in a non-finalize scope"
@@ -181,6 +185,10 @@ impl<N: Network> RegisterTypes<N> {
181185 }
182186 // If the operand is a block height type, throw an error.
183187 Operand :: BlockHeight => bail ! ( "Array element cannot be from a block height in a non-finalize scope" ) ,
188+ // If the operand is a block timestamp type, throw an error.
189+ Operand :: BlockTimestamp => {
190+ bail ! ( "Array element cannot be from a block timestamp in a non-finalize scope" )
191+ }
184192 // If the operand is a network ID type, throw an error.
185193 Operand :: NetworkID => bail ! ( "Array element cannot be from a network ID in a non-finalize scope" ) ,
186194 // If the operand is a checksum type, throw an error.
@@ -252,6 +260,9 @@ impl<N: Network> RegisterTypes<N> {
252260 Operand :: BlockHeight => {
253261 bail ! ( "Forbidden operation: Cannot cast a block height as a record owner" )
254262 }
263+ Operand :: BlockTimestamp => {
264+ bail ! ( "Forbidden operation: Cannot cast a block timestamp as a record owner" )
265+ }
255266 Operand :: NetworkID => {
256267 bail ! ( "Forbidden operation: Cannot cast a network ID as a record owner" )
257268 }
@@ -324,6 +335,12 @@ impl<N: Network> RegisterTypes<N> {
324335 "Record entry '{record_name}.{entry_name}' expects a '{plaintext_type}', but found a block height in the operand '{operand}'."
325336 )
326337 }
338+ // Fail if the operand is a block timestamp.
339+ Operand :: BlockTimestamp => {
340+ bail ! (
341+ "Record entry '{record_name}.{entry_name}' expects a '{plaintext_type}', but found a block timestamp in the operand '{operand}'."
342+ )
343+ }
327344 // Fail if the operand is a network ID.
328345 Operand :: NetworkID => {
329346 bail ! (
0 commit comments