github.com/nspcc-dev/neo-go@v0.105.2-0.20240517133400-6be757af3eba/pkg/core/doc.go (about) 1 /* 2 Package core implements Neo ledger functionality. 3 It's built around the Blockchain structure that maintains state of the ledger. 4 5 # Events 6 7 You can subscribe to Blockchain events using a set of Subscribe and Unsubscribe 8 methods. These methods accept channels that will be used to send appropriate 9 events, so you can control buffering. Channels are never closed by Blockchain, 10 you can close them after unsubscription. 11 12 Unlike RPC-level subscriptions these don't allow event filtering because it 13 doesn't improve overall efficiency much (when you're using Blockchain you're 14 in the same process with it and filtering on your side is not that different 15 from filtering on Blockchain side). 16 17 The same level of ordering guarantees as with RPC subscriptions is provided, 18 albeit for a set of event channels, so at first transaction execution is 19 announced via appropriate channels, then followed by notifications generated 20 during this execution, then followed by transaction announcement and then 21 followed by block announcement. Transaction announcements are ordered the same 22 way they're stored in the block. 23 24 Be careful using these subscriptions, this mechanism is not intended to be used 25 by lots of subscribers and failing to read from event channels can affect 26 other Blockchain operations. 27 */ 28 package core