Skip to content

Use more Writeable/Readable for Option<T> in ChannelMonitor serializer/deserializer #332

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ariard
Copy link

@ariard ariard commented Mar 30, 2019

Drop Box usage in remote_claimabe_outpoint

Should have been address in #271, don't get the Box usage and afferent heap consumption, is there a murky reason ? (tested on 1.22 too)

@TheBlueMatt
Copy link
Collaborator

Once the HTLCSources' are set to None, Option<Box> will be ptrsize_t (ie 8 bytes on 64-bit platforms) long. However, Option has a constant size, so setting it to None will not free any memory, which sucks cause there are potentially a lot of them (though they're only (currently) about 64 bytes long).

@ariard ariard force-pushed the 2019-03-option-serialize-channel-monitor branch from 356908b to bcd7bae Compare April 10, 2019 00:05
@ariard ariard changed the title Remove write_option in ChannelMonitor serializer Use more Writeable/Readable for Option<T> in ChannelMonitor serializer/deserializer Apr 10, 2019
@ariard
Copy link
Author

ariard commented Apr 10, 2019

Ah thanks to know, well updated PR scope and focus on where Option serialization helpers are effectively usable I think.

@TheBlueMatt TheBlueMatt merged commit 5bd8837 into lightningdevkit:master Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants