add endpoint that returns a block's hash and height #405

Closed
jeffreypicard wants to merge 1 commit from hash-block-height into master
jeffreypicard commented 2021-07-14 11:28:16 +02:00 (Migrated from github.com)

In the sdk we just use the height so I added this for convenience

In the sdk we just use the height so I added this for convenience
BrannonKing (Migrated from github.com) requested changes 2021-07-20 14:21:02 +02:00
BrannonKing (Migrated from github.com) left a comment

The entire header is 112 bytes. I think it would be useful to have a method that publishes that in full. The CBlockIndex has a method to get a CBlockHeader; that header is serializable, if that helps.

The entire header is 112 bytes. I think it would be useful to have a method that publishes that in full. The CBlockIndex has a method to get a CBlockHeader; that header is serializable, if that helps.
@ -447,11 +447,13 @@ void SetupServerArgs()
#if ENABLE_ZMQ
gArgs.AddArg("-zmqpubhashblock=<address>", "Enable publish hash block in <address>", false, OptionsCategory::ZMQ);
gArgs.AddArg("-zmqpubhashblockheader=<address>", "Enable publish hash block in <address>", false, OptionsCategory::ZMQ);
BrannonKing (Migrated from github.com) commented 2021-07-20 14:14:17 +02:00

The comment wasn't changed. And the name implies that you are sending the entire block header -- more than just hash and height.

The comment wasn't changed. And the name implies that you are sending the entire block header -- more than just hash and height.
BrannonKing (Migrated from github.com) commented 2021-07-20 14:13:29 +02:00

Copying an integer this way is architecture-dependent. Look at the functions in the endian.h file.

Copying an integer this way is architecture-dependent. Look at the functions in the endian.h file.

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbrycrd#405
No description provided.