-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
exp/lighthorizon: Add initial support for XDR serialization (#4369)
- Loading branch information
Showing
9 changed files
with
310 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
XDRS = xdr/LightHorizon-types.x | ||
|
||
XDRGEN_COMMIT=3f6808cd161d72474ffbe9eedbd7013de7f92748 | ||
|
||
.PHONY: xdr clean update | ||
|
||
xdr/xdr_generated.go: $(XDRS) | ||
docker run -it --rm -v $$PWD:/wd -w /wd ruby /bin/bash -c '\ | ||
gem install specific_install -v 0.3.7 && \ | ||
gem specific_install https://github.com/stellar/xdrgen.git -b $(XDRGEN_COMMIT) && \ | ||
xdrgen \ | ||
--language go \ | ||
--namespace xdr \ | ||
--output xdr/ \ | ||
$(XDRS)' | ||
ls -lAh | ||
go fmt $@ | ||
|
||
xdr: xdr/xdr_generated.go | ||
|
||
clean: | ||
rm ./xdr/xdr_generated.go || true | ||
|
||
update: clean xdr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ import "github.com/stellar/go/support/log" | |
|
||
func main() { | ||
log.SetLevel(log.InfoLevel) | ||
Map() | ||
// Map() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright 2022 Stellar Development Foundation and contributors. Licensed | ||
// under the Apache License, Version 2.0. See the COPYING file at the root | ||
// of this distribution or at http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
namespace stellar | ||
{ | ||
|
||
typedef unsigned int uint32; | ||
typedef opaque Value<>; | ||
|
||
struct CheckpointIndex { | ||
uint32 firstCheckpoint; | ||
uint32 lastCheckpoint; | ||
Value bitmap; | ||
}; | ||
|
||
} |
Oops, something went wrong.