You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #2502 we should make sure we only construct NoteScripts from libraries, for uniformity. Additionally, there are some small improvements we can make:
Remove NoteScript::new and convert usages to NoteScript::from_library(_reference).
Add a test for NoteScript::from_library which is currently unused. Check if there is an opportunity to deduplicate code with NoteScript::from_library_reference.
Prefer calling NoteScript::from_parts within the from_library* methods so we have a single place where a note script is actually created.
Remove NoteScript::from_bytes which is unused and delegates to deserialization internally. This is not our usual pattern for deserializing from bytes.
After #2502 we should make sure we only construct
NoteScripts from libraries, for uniformity. Additionally, there are some small improvements we can make:NoteScript::newand convert usages toNoteScript::from_library(_reference).NoteScript::from_librarywhich is currently unused. Check if there is an opportunity to deduplicate code withNoteScript::from_library_reference.NoteScript::from_partswithin thefrom_library*methods so we have a single place where a note script is actually created.NoteScript::from_byteswhich is unused and delegates to deserialization internally. This is not our usual pattern for deserializing from bytes.Context: #2502 (comment)