Skip to content
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

soroban-xdr-next-next: Fix XDR bool encoding/decoding #4818

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ xdr/Stellar-contract-spec.x \
xdr/Stellar-contract.x \
xdr/Stellar-internal.x

XDRGEN_COMMIT=57beb46bd3d1c77529218430bd6ed87cd69ac394
XDRGEN_COMMIT=9cbdfbe94ced89d9728f8706225ac86fc45705bc
XDRNEXT_COMMIT=7356dc237ee0db5626561c129fb3fa4beaabbac6

.PHONY: xdr xdr-clean xdr-update
Expand Down
8 changes: 4 additions & 4 deletions xdr/xdr_generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -15873,7 +15873,7 @@ type DiagnosticEvent struct {
// EncodeTo encodes this value using the Encoder.
func (s *DiagnosticEvent) EncodeTo(e *xdr.Encoder) error {
var err error
if _, err = e.Encode(s.InSuccessfulContractCall); err != nil {
if _, err = e.EncodeBool(bool(s.InSuccessfulContractCall)); err != nil {
return err
}
if err = s.Event.EncodeTo(e); err != nil {
Expand All @@ -15888,7 +15888,7 @@ var _ decoderFrom = (*DiagnosticEvent)(nil)
func (s *DiagnosticEvent) DecodeFrom(d *xdr.Decoder) (int, error) {
var err error
var n, nTmp int
nTmp, err = d.Decode(s.InSuccessfulContractCall)
s.InSuccessfulContractCall, nTmp, err = d.DecodeBool()
n += nTmp
if err != nil {
return n, fmt.Errorf("decoding Bool: %s", err)
Expand Down Expand Up @@ -50913,7 +50913,7 @@ func (u ScVal) EncodeTo(e *xdr.Encoder) error {
}
switch ScValType(u.Type) {
case ScValTypeScvBool:
if _, err = e.Encode((*u.B)); err != nil {
if _, err = e.EncodeBool(bool((*u.B))); err != nil {
return err
}
return nil
Expand Down Expand Up @@ -51046,7 +51046,7 @@ func (u *ScVal) DecodeFrom(d *xdr.Decoder) (int, error) {
switch ScValType(u.Type) {
case ScValTypeScvBool:
u.B = new(bool)
nTmp, err = d.Decode(u.B)
(*u.B), nTmp, err = d.DecodeBool()
n += nTmp
if err != nil {
return n, fmt.Errorf("decoding Bool: %s", err)
Expand Down