Skip to content

Conversation

paveljanik and others added 6 commits April 9, 2021 00:17
Support is added to serialize arrays of type char or unsigned char directly,
without any wrappers. All invocations of the FLATDATA wrappers that are
obsoleted by this are removed.

This includes a patch by Russell Yanofsky to make char casting type safe.

The serialization of CSubNet is changed to serialize a bool directly rather
than though FLATDATA. This makes the serialization independent of the size
of the bool type (and will use 1 byte everywhere).
Add logging and error handling inside, and outside of FileCommit.
Functions such as fsync, fdatasync will return error in case of hardware
I/O errors, and ignoring this means it can silently continue through
data corruption.  (c.f.
https://lwn.net/SubscriberLink/752063/12b232ab5039efbe/)
Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Just a compatibility concern with the last commit.

@furszy furszy force-pushed the 2021_addrdb_and_serialization_updates branch from 86a1517 to d593e7e Compare April 13, 2021 23:38
@furszy
Copy link
Author

furszy commented Apr 13, 2021

Updated per feedback

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK d593e7e

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK d593e7e

with a minor nit

READWRITE(FLATDATA(portN));
if (ser_action.ForRead())
port = ntohs(portN);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra un-necessary indenting managed to get in here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also restore our styling convention of branching on newlines for functions implementations here.
Merging this for now. We can fix the styling in a separate trivial PR.

@random-zebra random-zebra merged commit 116bb50 into PIVX-Project:master Apr 20, 2021
random-zebra added a commit that referenced this pull request Apr 20, 2021
…/.cpp

1431af9 [Trivial] fix code styling in netaddress.h/.cpp (random-zebra)

Pull request description:

  Trivial. Ref: #2304 (comment)

ACKs for top commit:
  furszy:
    utACK 1431af9

Tree-SHA512: 981d3b145ab26e28d3b5549c60854e401016cd6247a712f29859c2d9f26fbe786918cc5b306c18ed3b913a7e2de03946f624b0734db982a6e6ca42c9fb4c2449
@furszy furszy deleted the 2021_addrdb_and_serialization_updates branch November 29, 2022 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants