Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Nov 10, 2021
1 parent acfbcf6 commit 8092ab8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/stellar/xdrgen.git
revision: 92a28e1f3ef3a2b7e9409a2baa2c5ed0751d3e1c
revision: 4677de9fcda28ce314415b3246211ec4657a0eab
ref: master
specs:
xdrgen (0.1.1)
Expand Down Expand Up @@ -41,7 +41,7 @@ GEM
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
i18n (1.8.10)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
memoist (0.11.0)
method_source (1.0.0)
Expand Down Expand Up @@ -79,4 +79,4 @@ DEPENDENCIES
xdrgen!

BUNDLED WITH
2.2.22
2.2.29
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ xdr/Stellar-overlay.x \
xdr/Stellar-transaction.x \
xdr/Stellar-types.x

.PHONY: xdr

keystore:
$(MAKE) -C services/keystore/ docker-build

Expand Down
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ namespace :xdr do
require "pathname"
require "xdrgen"
require 'fileutils'
FileUtils.rm_f("xdr/xdr_generated.go")

compilation = Xdrgen::Compilation.new(
LOCAL_XDR_PATHS,
Expand Down
3 changes: 2 additions & 1 deletion benchmarks/xdr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/base64"
"testing"

xdr3 "github.com/stellar/go-xdr/xdr3"
"github.com/stellar/go/gxdr"
"github.com/stellar/go/xdr"
goxdr "github.com/xdrpp/goxdr/xdr"
Expand Down Expand Up @@ -66,7 +67,7 @@ func BenchmarkGXDRUnmarshal(b *testing.B) {

func BenchmarkXDRMarshalWithReflection(b *testing.B) {
for i := 0; i < b.N; i++ {
_, _ = xdr.Marshal(&bytes.Buffer{}, xdrInput)
_, _ = xdr3.Marshal(&bytes.Buffer{}, xdrInput)
}
}

Expand Down
14 changes: 7 additions & 7 deletions xdr/xdr_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ func (e Thresholds) XDRMaxSize() int {
}

// EncodeTo encodes this value using the Encoder.
func (s Thresholds) EncodeTo(e *xdr.Encoder) error {
func (s *Thresholds) EncodeTo(e *xdr.Encoder) error {
var err error
_, err = e.EncodeFixedOpaque(s[:])
if err != nil {
Expand Down Expand Up @@ -1327,7 +1327,7 @@ type PoolId Hash
// EncodeTo encodes this value using the Encoder.
func (s PoolId) EncodeTo(e *xdr.Encoder) error {
var err error
err = Hash(s).EncodeTo(e)
err = (*Hash)(&s).EncodeTo(e)
if err != nil {
return err
}
Expand Down Expand Up @@ -1371,7 +1371,7 @@ func (e AssetCode4) XDRMaxSize() int {
}

// EncodeTo encodes this value using the Encoder.
func (s AssetCode4) EncodeTo(e *xdr.Encoder) error {
func (s *AssetCode4) EncodeTo(e *xdr.Encoder) error {
var err error
_, err = e.EncodeFixedOpaque(s[:])
if err != nil {
Expand Down Expand Up @@ -1417,7 +1417,7 @@ func (e AssetCode12) XDRMaxSize() int {
}

// EncodeTo encodes this value using the Encoder.
func (s AssetCode12) EncodeTo(e *xdr.Encoder) error {
func (s *AssetCode12) EncodeTo(e *xdr.Encoder) error {
var err error
_, err = e.EncodeFixedOpaque(s[:])
if err != nil {
Expand Down Expand Up @@ -25927,7 +25927,7 @@ func (e Hash) XDRMaxSize() int {
}

// EncodeTo encodes this value using the Encoder.
func (s Hash) EncodeTo(e *xdr.Encoder) error {
func (s *Hash) EncodeTo(e *xdr.Encoder) error {
var err error
_, err = e.EncodeFixedOpaque(s[:])
if err != nil {
Expand Down Expand Up @@ -25973,7 +25973,7 @@ func (e Uint256) XDRMaxSize() int {
}

// EncodeTo encodes this value using the Encoder.
func (s Uint256) EncodeTo(e *xdr.Encoder) error {
func (s *Uint256) EncodeTo(e *xdr.Encoder) error {
var err error
_, err = e.EncodeFixedOpaque(s[:])
if err != nil {
Expand Down Expand Up @@ -26747,7 +26747,7 @@ func (e SignatureHint) XDRMaxSize() int {
}

// EncodeTo encodes this value using the Encoder.
func (s SignatureHint) EncodeTo(e *xdr.Encoder) error {
func (s *SignatureHint) EncodeTo(e *xdr.Encoder) error {
var err error
_, err = e.EncodeFixedOpaque(s[:])
if err != nil {
Expand Down

0 comments on commit 8092ab8

Please sign in to comment.