filter — Configure bloomfilters

Bloomfilters affect the return results of the GETDATA and GETBLOCKBYINDEX message types. See getdata and getblockdata respectively. The mechanism is present in the C# reference implementation but without active use-case.

class neo3.network.payloads.filter.FilterLoadPayload(filter)

Bases: neo3.core.serialization.ISerializable

Create payload.

Parameters

filter (BloomFilter) – bloom filter to load

deserialize(reader)

Deserialize the object from a binary stream.

Parameters

reader (BinaryReader) – instance.

Return type

None

classmethod deserialize_from_bytes(data)

Parse data into an object instance.

Parameters

data (Union[bytes, bytearray]) – hex escaped bytes.

Return type

~ISerializable_T

Returns

a deserialized instance of the class.

serialize(writer)

Serialize the object into a binary stream.

Parameters

writer (BinaryWriter) – instance.

Return type

None

to_array()

Serialize the object into a bytearray.

Return type

bytes

class neo3.network.payloads.filter.FilterAddPayload(data)

Bases: neo3.core.serialization.ISerializable

Create payload.

Parameters

data (bytes) – the data to add to the configured bloomfilter.

deserialize(reader)

Deserialize the object from a binary stream.

Parameters

reader (BinaryReader) – instance.

Return type

None

classmethod deserialize_from_bytes(data)

Parse data into an object instance.

Parameters

data (Union[bytes, bytearray]) – hex escaped bytes.

Return type

~ISerializable_T

Returns

a deserialized instance of the class.

serialize(writer)

Serialize the object into a binary stream.

Parameters

writer (BinaryWriter) – instance.

Return type

None

to_array()

Serialize the object into a bytearray.

Return type

bytes